A, B = map(int, input().split()) if (B % A == 0): print("{0:d}".format(int(B/A))) else: print('NO')