a=int(input())
b=int(input())
if(a > b ):
max= a
else:
max=b
while(True):
if(max % a == 0 and max % b == 0):
x=max
break
max=max+ 1
a=max//a
b=max//b
print(a-1,b-1)
Copyright (c) 2021 - 2024 Sky Carrer Guidance All Right Reseved
0 Comments