#!/usr/bin/python

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