A, B = map(int, input().split(' ')) if 0 != B % A: print('NO') else: print(B//A)