#!/usr/bin/env python3 import sys readline = sys.stdin.buffer.readline sys.setrecursionlimit(10 ** 7) a, b = map(int, input().split()) d = max(0, a + 1 - b) print('YES' if d == 0 else 'NO') print(d)