A, B = map( int, input().split() ) x = B // A if A * x != B: print( "NO" ) else: print( x )