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