# -*- coding: utf-8 -*- a,b = map(int,input().split()) if (b / a).is_integer(): print(int(b/a)) else: print("NO")