# -*- coding: utf-8 -*- A,B = map(int, input().split()) q = B // A r = B % A print(q) if r==0 else print('NO')