a, b = map(int, input().split()) if b == 0: print(0) elif b % a == 0: print(b // a) else: print('NO')