E - Good Numbers

Languages: C, C++, Java, Python, Kotlin
Time & Memory limits: (details)

Input

Output

Sample test(s)

Input
204 301
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
204 300
--- Showing first 30 lines (click "Copy" to get full content) ---
Input
91 95
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
-1 -1
--- Showing first 30 lines (click "Copy" to get full content) ---