boys,girls = map(int,input().split()) if boys % girls == 0 : print('YES') else: print('NO') print(abs(boys - girls))