A, B = map(int, input().split()) x, y = B // A, B / A if x == y: print(x) else: print('NO')