inp = input().split() A = int(inp[0]) B = int(inp[1]) if B % A == 0 : print(B // A) else : print('NO')