a = int(input()) b = int(input()) if a == 1: print(2 ** 100) print(2 ** 100) else: print(b // (1 - a)) print(b // (1 - a))