import sys import os f = open("C:/Users/user/Documents/python/yukicoder/import.txt","r") sys.stdin = f # -*- coding: utf-8 -*- a,b = map(int,input().split()) if a >= b: print("No") print(a-b+1) else: print("YES") print(b-a-1)