On her way to programming school tiger Dasha faced her first test — a huge staircase! [Image] 

The steps were numbered from one to infinity. As we know, tigers are very fond of all striped things, it is possible that it has something to do with their color. So on some interval of her way she calculated two values — the number of steps with even and odd numbers. 

You need to check whether there is an interval of steps from the l-th to the r-th (1 ≤ l ≤ r), for which values that Dasha has found are correct.


-----Input-----

In the only line you are given two integers a, b (0 ≤ a, b ≤ 100) — the number of even and odd steps, accordingly.


-----Output-----

In the only line print "YES", if the interval of steps described above exists, and "NO" otherwise.


-----Examples-----
Input
2 3

Output
YES

Input
3 1

Output
NO



-----Note-----

In the first example one of suitable intervals is from 1 to 5. The interval contains two even steps — 2 and 4, and three odd: 1, 3 and 5.

Difficulty: EASY

Solutions:
(a, b) = map(int, input().split())
print('YES' if abs(a - b) < 2 and a + b > 0 else 'NO')


(n, m) = map(int, input().split())
if n == 0 and m == 0:
	print('NO')
elif abs(n - m) <= 1:
	print('YES')
else:
	print('NO')


(l, r) = list(map(int, input().split()))
print('YES' if abs(l - r) <= 1 and l + r > 0 else 'NO')


(a, b) = map(int, input().split())
if a == b and a != 0 or a == b - 1 or a == b + 1 or (b == 1 and a == 0):
	print('YES')
else:
	print('NO')


line = [int(e) for e in input().split(' ')]
print(['NO', 'YES'][abs(line[0] - line[1]) < 2 and line[0] + line[1] > 0])


(a, b) = map(int, input().split())
for l in range(1, 3):
	for r in range(l, 555):
		(o, e) = (0, 0)
		for x in range(l, r + 1):
			o += x % 2
			e += 1 - x % 2
		if o == b and e == a:
			print('YES')
			exit()
print('NO')


(a, b) = list(map(int, input().split()))
if a == b == 0:
	print('NO')
else:
	print('YES' if abs(a - b) <= 1 else 'NO')


(a, b) = map(int, input().strip().split())
if a == 0 and b == 0:
	print('NO')
elif (a + b) % 2 == 0:
	if a == b:
		print('YES')
	else:
		print('NO')
elif b - a == 1 or a - b == 1:
	print('YES')
else:
	print('NO')


a = input().split()
s = int(a[0])
d = int(a[1])
if s == 0 and d == 0:
	print('NO')
elif abs(s - d) <= 1:
	print('YES')
else:
	print('NO')


l = input().split()
if abs(int(l[0]) - int(l[1])) > 1 or int(l[0]) + int(l[1]) == 0:
	print('NO')
else:
	print('YES')


import math

def get_primes(prime_supr):
	is_prime = [0] * 2 + [1] * prime_supr
	for i in range(2, int(math.sqrt(prime_supr)) + 1):
		if is_prime[i]:
			for j in range(i * i, prime_supr + 1, i):
				is_prime[j] = 0
	return is_prime

def get_int():
	return map(int, input().split())
(n, k) = get_int()
print(['NO', 'YES'][math.fabs(n - k) <= 1 and n + k > 0])


(a, b) = map(int, input().split())
if a == b and b == 0:
	print('NO')
elif abs(a - b) <= 1:
	print('YES')
else:
	print('NO')


(even, odd) = (int(x) for x in input().split())
if abs(even - odd) > 1:
	print('NO')
elif even == 0 and odd == 0:
	print('NO')
else:
	print('YES')


(a, b) = map(int, input().split())
print(['NO', 'YES'][(abs(a - b) < 2) * (a + b > 0)])


for l in range(10):
	for r in range(l, 10):
		e = 0
		o = 0
		for i in range(l, r):
			if i % 2 == 0:
				e += 1
			else:
				o += 1

def f(a, b):
	if a == 0 and b == 0:
		return 'NO'
	if a - b == 0:
		return 'YES'
	if abs(a - b) == 1:
		return 'YES'
	return 'NO'
(a, b) = input().split()
a = int(a)
b = int(b)
print(f(a, b))


import math
(a, b) = input().split()
a = math.fabs(int(a))
b = math.fabs(int(b))
z = a - b
z = math.fabs(z)
if a == 0 and b == 0:
	print('NO')
elif z > 1:
	print('NO')
else:
	print('YES')


(a, b) = map(int, input().split())
print(('NO', 'YES')[(a == b or abs(a - b) == 1) and a | b != 0])


(n, x) = list(map(int, input().rstrip().split(' ')))
if abs(x - n) > 1 or x == n == 0:
	print('NO')
else:
	print('YES')


def main():
	(a, b) = map(int, input().split())
	print(('NO', 'YES')[(a or b) and -2 < a - b < 2])
main()


def main():
	s = input().split()
	a = int(s[0])
	b = int(s[1])
	if not (a or b):
		print('NO')
		return
	d = a - b
	if abs(d) > 1:
		print('NO')
	else:
		print('YES')

def f():
	pass
main()


string = input()
numbers = string.split(' ')
a = int(numbers[0])
b = int(numbers[1])
if abs(a - b) <= 1 and a + b != 0:
	print('YES')
else:
	print('NO')


import sys
(a, b) = map(int, sys.stdin.readline().split())
if a == 0 and b == 0:
	print('NO\n')
elif abs(b - a) == 1 or b - a == 0:
	print('YES\n')
else:
	print('NO\n')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	(a, b) = LI()
	if abs(a - b) < 2 and a + b > 0:
		return 'YES'
	return 'NO'
print(main())


(x, y) = input().split()
(x, y) = (int(x), int(y))
if x + 1 == y:
	print('YES')
elif x == y and x != 0:
	print('YES')
elif x == y + 1:
	print('YES')
else:
	print('NO')


(n, m) = input().strip().split()
n = int(n)
m = int(m)
if n == 0 and m == 0:
	print('NO')
elif n - m > 1 or m - n > 1:
	print('NO')
else:
	print('YES')


import math, re, itertools as it
prime = lambda n: len([i for i in range(2, int(math.sqrt(n) + 1)) if n % i == 0]) == 0
gcd = lambda a, b: gcd(b, a % b) if b else a
fact = lambda x: x * fact(x - 1) if x else 1
bino = lambda n, k: fact(n) / fact(k) / fact(n - k)
fib11 = lambda n: 1 if n < 2 else fib11(n - 1) + fib11(n - 2)
fib01 = lambda n: 0 if n == 0 else 1 if n == 1 else fib01(n - 1) + fib01(n - 2)
sumofd = lambda x: x if x < 10 else sumofd(x // 10) + x % 10
(n, m) = map(int, input().split(' '))
print('YES' if abs(n - m) < 2 and (n != 0 or m != 0) else 'NO')


res = 'NO'
a = list(map(int, input().split()))
if a[0] != 0 or a[1] != 0:
	if abs(a[0] - a[1]) <= 1:
		res = 'YES'
print(res)


a = [int(i) for i in input().split()]
p = int(a[0])
n = int(a[1])
if p == n + 1 or p == n or n == p + 1:
	if p == 0 and n == 0:
		print('NO')
	else:
		print('YES')
else:
	print('NO')


import sys
(a, b) = map(int, sys.stdin.readline().split())
if a == 0 and b == 0:
	print('NO')
	exit()
t = abs(a - b)
if t == 0 or t == 1:
	print('YES')
else:
	print('NO')


z = list(map(int, input().split()))
if abs(z[0] - z[1]) > 1:
	print('NO')
elif z[0] == 0 and z[1] == 0:
	print('NO')
else:
	print('YES')


s = input()
nums = s.split(' ')
a = int(nums[0])
b = int(nums[1])
if (a == b or b == a + 1 or a == b + 1) and (not (b == 0 and a == 0)):
	print('YES')
else:
	print('NO')


(n, m) = map(int, input().split())
if max(n, m) - min(n, m) in {0, 1}:
	if n == 0 and m == 0:
		print('NO')
	else:
		print('YES')
else:
	print('NO')


[evenNumbers, oddNumbers] = [int(x) for x in input().split()]
if evenNumbers == 0 and oddNumbers == 0:
	print('NO')
elif abs(evenNumbers - oddNumbers) > 1:
	print('NO')
else:
	print('YES')


(a, b) = [int(x) for x in input().split(' ')]
if a == b == 0:
	print('NO')
elif abs(a - b) <= 1:
	print('YES')
else:
	print('NO')


(a, b) = [int(i) for i in input().split()]
if abs(a - b) >= 2:
	print('NO')
elif a == 0 and b == 0:
	print('NO')
elif abs(a - b) <= 2:
	print('YES')
else:
	print('NO')


vstup = list(map(int, input().split()))
if vstup[0] + vstup[1] == 0:
	print('NO')
elif abs(vstup[0] - vstup[1]) > 1:
	print('NO')
else:
	print('YES')


a = list(map(int, input().split()))
b = abs(a[0] - a[1])
if a[0] == 0 and a[1] == 0:
	jawab = 'NO'
elif b == 1 or b == 0:
	jawab = 'YES'
else:
	jawab = 'NO'
print(f'{jawab}')


st = [int(i) for i in input().split(' ')]
a = st[0]
b = st[1]
if abs(a - b) == 1 or (abs(a - b) == 0 and a != 0 and (b != 0)):
	print('YES')
else:
	print('NO')


import math
(a, b) = list(map(int, input().split()))
if math.fabs(a - b) <= 1 and (not (a == 0 and b == 0)):
	print('YES')
else:
	print('NO')


import math

def main():
	(a, b) = map(int, input().split())
	return 'YES' if a + b != 0 and (a == b or abs(b - a) == 1) else 'NO'
print(main())


(a, b) = [int(x) for x in input().split()]
n = a + b
diff = a - b
if a == 0 and b == 0:
	print('NO')
elif diff >= -2 and diff <= 2:
	if n % 2 == 0 and (a % 2 == 0 and b % 2 == 0 or (a % 2 != 0 and b % 2 != 0)) and (diff <= 1 and diff >= -1) or (n % 2 != 0 and (a % 2 != 0 or b % 2 != 0)):
		print('YES')
	else:
		print('NO')
else:
	print('NO')


import math

def main():
	a = input().split()
	x = int(a[0])
	y = int(a[1])
	if x == 0 and y == 0:
		print('NO')
	elif abs(x - y) <= 1:
		print('YES')
	else:
		print('NO')
main()


import math, fractions, collections
(a, b) = [int(x) for x in input().split()]
print('YES' if abs(a - b) < 2 and (not (a == 0 and b == 0)) else 'NO')


def match(a, b, start, end):
	(e, o) = (0, 0)
	for i in range(start, a + b + end):
		if i % 2 == 0:
			e += 1
		else:
			o += 1
	if e == a and o == b:
		print('YES')
	else:
		print('NO')
(a, b) = map(int, input().split())
if a == 0 and b == 0:
	print('NO')
elif a > b:
	match(a, b, 2, 2)
else:
	match(a, b, 1, 1)


(a, b) = map(int, input().split())
c = a + b
d = 0
e = 0
if a == 0 and b == 0:
	print('NO')
else:
	if c % 2 == 0:
		d = c // 2
		e = c // 2
	else:
		d = c // 2
		e = c // 2 + 1
	if a == d or (a == e and b == e) or b == d:
		print('YES')
	else:
		print('NO')


(q, w) = map(int, input().split())
if (abs(w - q) == 1) | (q == w) & (q != 0) & (w != 0):
	print('YES')
else:
	print('NO')


steps = list(map(int, input().split()))
a = steps[0]
b = steps[1]
if b > 0 and a > 0:
	if b - a == 0 or b - a == 1 or b - a == -1:
		print('YES')
	else:
		print('NO')
elif a == 0:
	if b == 1:
		print('YES')
	else:
		print('NO')
elif b == 0:
	if a == 1:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


s = [int(x) for x in input().split()]
(a, b) = (s[0], s[1])
if a != 0 or b != 0:
	if a == b or abs(a - b) == 1:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(i, j) = map(int, input().split())
if not i and (not j):
	print('NO')
elif abs(i - j) > 1:
	print('NO')
else:
	print('YES')


import math
(a, b) = map(int, input().split())
if a == 0 and b == 0:
	print('NO')
elif a == b or a + 1 == b or a == b + 1:
	print('YES')
else:
	print('NO')


def ri():
	return map(int, input().split())
(a, b) = ri()
if a == 0 and b == 0:
	print('NO')
	exit()
diff = abs(a - b)
if diff == 0 or diff == 1:
	print('YES')
else:
	print('NO')


X = list(map(int, input().split()))
print('YES' if X.count(0) != 2 and X[1] - X[0] in [0, 1, -1] else 'NO')


(n, m) = [int(i) for i in input().split()]
ans = 'NO'
if abs(n - m) <= 1 and m + n != 0:
	ans = 'YES'
print(ans)


def Main():
	v = list(map(int, input().split()))
	if v[0] == 0 and v[1] == 0:
		print('NO')
	elif abs(v[0] - v[1]) <= 1:
		print('YES')
	else:
		print('NO')
Main()


(no_of_odds, no_of_evens) = map(int, input().split())
if abs(no_of_odds - no_of_evens) <= 1 and no_of_odds + no_of_evens >= 1:
	print('YES')
else:
	print('NO')


s = input().split()
a = int(s[0])
b = int(s[1])
if a == 0 and b == 0:
	print('NO')
elif (a - b) ** 2 <= 1:
	print('YES')
else:
	print('NO')


l1 = [int(x) for x in input().split()]
if l1[0] or l1[1]:
	if max(l1[0], l1[1]) - min(l1[0], l1[1]) > 1:
		print('NO')
	else:
		print('YES')
else:
	print('NO')


from collections import deque as de
import math
from collections import Counter as cnt
from functools import reduce
from typing import MutableMapping
from itertools import groupby as gb
from fractions import Fraction as fr

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def get_prime_factors(number):
	prime_factors = []
	while number % 2 == 0:
		prime_factors.append(2)
		number = number / 2
	for i in range(3, int(math.sqrt(number)) + 1, 2):
		while number % i == 0:
			prime_factors.append(int(i))
			number = number / i
	if number > 2:
		prime_factors.append(int(number))
	return prime_factors

def get_frequency(list):
	dic = {}
	for ele in list:
		if ele in dic:
			dic[ele] += 1
		else:
			dic[ele] = 1
	return dic

def Log2(x):
	return math.log10(x) / math.log10(2)

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))

def ceildiv(x, y):
	return (x + y - 1) // y
(a, b) = map(int, input().split())
if a == 0 and b == 0:
	print('NO')
elif abs(a - b) <= 1:
	print('YES')
else:
	print('NO')


from sys import stdin
(odd, even) = map(int, stdin.readline().split())
if abs(odd - even) <= 1 and (odd != 0 or even != 0):
	print('YES')
else:
	print('NO')


(even, odd) = list(map(int, input().split()))
if even != 0 or odd != 0:
	if even == odd + 1 or odd == even + 1 or odd == even:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


a = input()
(c, b) = a.split(' ')
c = int(c)
b = int(b)
if b == c == 0:
	print('NO')
elif c >= b:
	if c - b <= 1:
		print('YES')
	else:
		print('NO')
elif b - c <= 1:
	print('YES')
else:
	print('NO')


def HasStep(a, b):
	if a == 0 and b == 0:
		print('NO')
	elif b - a == 1 or b - a == 0 or b - a == -1:
		print('YES')
	else:
		print('NO')
(a, b) = [int(x) for x in input().split()]
HasStep(a, b)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, random

def Main(a, b):
	if (a != 0 or b != 0) and (abs(a - b) == 0 or abs(a - b) == 1):
		print('YES')
	else:
		print('NO')
(a, b) = map(int, input().split())
Main(a, b)


from sys import exit
(a, b) = [int(x) for x in input().split()]
if abs(a - b) > 1 or (a == 0 and b == 0):
	print('NO')
	exit()
else:
	print('YES')
	exit()


import sys

def debug(x, table):
	for (name, val) in table.items():
		if x is val:
			print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
			return None

def solve():
	(a, b) = map(int, input().split())
	if a + b > 0 and abs(a - b) <= 1:
		ans = 'YES'
	else:
		ans = 'NO'
	print(ans)
solve()


(y, x) = [*map(int, input().split())]
if x == 0 and y == 0:
	print('NO')
else:
	print('YES') if (x - y) ** 2 <= 1 else print('NO')


from sys import stdin
(a, b) = map(int, stdin.readline().split())
print('YES' if a + b > 0 and (a == b or a + 1 == b or a == b + 1) else 'NO')


(even, odd) = input().split(' ')
odd = int(odd)
even = int(even)
if odd == 0 and even == 0:
	print('NO')
elif (odd + even) % 2 == 0:
	if odd == even:
		print('YES')
	else:
		print('NO')
elif even + 1 == odd or odd + 1 == even:
	print('YES')
else:
	print('NO')


(a, b) = [int(x) for x in input().split(' ')]
if a == 0 and b == 0:
	print('NO')
	exit()
print('YES' if abs(a - b) < 2 else 'NO')


(even, odd) = map(int, input().split())
if even == 0 and odd == 0:
	print('NO')
elif even == odd or abs(even - odd) == 1:
	print('YES')
else:
	print('NO')


import math
(a, b) = [int(i) for i in input().split()]
if math.fabs(a - b) <= 1 and (not (a == 0 and b == 0)):
	print('YES')
else:
	print('NO')


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
(a, b) = map(int, input().split())
if a + b > 0 and abs(a - b) <= 1:
	print('YES')
else:
	print('NO')


(a, b) = tuple(map(int, input().split()))
if a == b == 0:
	print('NO')
elif abs(a - b) < 2:
	print('YES')
else:
	print('NO')


(x, y) = map(int, input().split())
if abs(x - y) > 1 or (x == 0 and y == 0):
	print('NO')
else:
	print('YES')


import sys
(a, b) = input().split()
a = int(a)
b = int(b)
x = a - b
if a == 0 and b == 0:
	print('NO')
	sys.exit()
if x < 0:
	x = -x
if x > 1:
	print('NO')
else:
	print('YES')


a = input().split()
b = int(a[0])
c = int(a[1])
x = b + c
i = 1
lst = []
r = 0
s = 0
if b == 0 and c == 0:
	print('NO')
else:
	while i <= x:
		y = i
		lst.append(i)
		i = i + 1
	for j in lst:
		if j % 2 == 0:
			r = r + 1
		else:
			s = s + 1
	if r == b and s == c or (r == c and s == b):
		print('YES')
	else:
		print('NO')


(p, n) = input().split()
p = int(p)
n = int(n)
if p == 0 and n == 0:
	print('NO')
elif p == n or n - p == 1 or p - n == 1:
	print('YES')
else:
	print('NO')


(a, b) = map(int, input().split())
if max(a, b) - 1 == min(a, b):
	print('YES')
elif a == b and a != 0 and (b != 0):
	print('YES')
else:
	print('NO')


(a, b) = map(int, input().split())
d = abs(a - b)
if d > 1 or a + b == 0:
	print('NO')
else:
	print('YES')


(u, v) = map(int, input('').split())
if u == 0 and v == 0:
	print('NO')
elif abs(u - v) > 1:
	print('NO')
else:
	print('YES')


a = input()
a = a.split()
n = int(a[0])
m = int(a[1])
if n == 0 and m == 0:
	print('NO')
elif abs(n - m) < 2:
	print('YES')
else:
	print('NO')


(n, m) = list(map(int, input().split()))
if abs(n - m) < 2 and n + m > 0:
	print('YES')
else:
	print('NO')


import sys
import math
import bisect

def solve(a, b):
	if a == 0 and b == 0:
		return False
	return abs(a - b) <= 1

def main():
	(a, b) = map(int, input().split())
	if solve(a, b):
		print('YES')
	else:
		print('NO')
main()


from sys import stdin, stdout
(a, b) = map(int, stdin.readline().split())
if not a and (not b) or abs(a - b) > 1:
	stdout.write('NO')
else:
	stdout.write('YES')


(a, b) = [int(i) for i in input().split()]
if a == 0 and b == 0:
	print('NO')
	exit(0)
if abs(a - b) <= 1:
	print('YES')
	exit(0)
print('NO')


(a, b) = map(int, input().split())
if abs(a - b) > 1 or not (a or b):
	print('NO')
else:
	print('YES')


(a, b) = list(map(int, input().split()))
c = -1 if a == 0 and b == 0 else abs(a - b)
if c == 0 or c == 1:
	print('YES')
else:
	print('NO')


for i in range(1):
	(n, m) = map(int, input().split())
	if n != 0 or m != 0:
		if abs(n - m) == 0 or abs(n - m) == 1:
			print('YES')
		else:
			print('NO')
	else:
		print('NO')


n = list(map(int, input().split()))
even = n[0]
odd = n[1]
if even == 0 and odd == 0:
	print('NO')
	quit()
if abs(even - odd) == 1 or abs(even - odd) == 0:
	print('YES')
else:
	print('NO')


(a, b) = map(int, input().split())
print('NO' if a == b == 0 else 'YES' if b - 2 < a <= b or b <= a < b + 2 or a - 2 < b <= a or (a <= b < a + 2) else 'NO')


[a, b] = list(map(int, input().split(' ')))
print('YES' if max(a - b, b - a) <= 1 and a + b > 0 else 'NO')


import sys
(ch, nch) = list(map(int, input().split()))
if ch == 0 and nch == 0:
	print('NO')
	sys.exit()
if ch - 1 == nch or ch + 1 == nch or ch == nch:
	print('YES')
else:
	print('NO')


(even, odd) = [int(x) for x in input().split(' ')]
if abs(even - odd) > 1 or even == odd == 0:
	print('NO')
	exit(0)
print('YES')


import sys
read = lambda : sys.stdin.readline().strip()
write = lambda x: sys.stdout.write(x + '\n')
(a, b) = map(int, read().split())
if abs(a - b) <= 1:
	if a == 0 and b == 0:
		write('NO')
	else:
		write('YES')
else:
	write('NO')


import sys, math
(a, b) = [int(x) for x in sys.stdin.readline().split()]
print('YES' if (a > 0 or b > 0) and math.fabs(a - b) <= 1 else 'NO')


(a, b) = tuple([int(x) for x in input().split()])
if b - 1 <= a <= b + 1 and a + b != 0:
	print('YES')
else:
	print('NO')


(q, w) = map(int, input().split())
if q == 0 and w == 0:
	print('NO')
elif q == w or q == w + 1 or q + 1 == w:
	print('YES')
else:
	print('NO')


def solve():
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		print('NO')
		return
	if max(a, b) - min(a, b) > 1:
		print('NO')
	else:
		print('YES')
solve()


a = list((int(x) for x in input().split()))
if a[0] == 0 and a[1] == 0:
	print('NO')
elif abs(a[0] - a[1]) <= 1:
	print('YES')
else:
	print('NO')


(q, a) = map(int, input().split())
if abs(q - a) <= 1 and q + a > 0:
	print('YES')
else:
	print('NO')


def dasha_stairs():
	stairs = list(map(int, input().split()))
	if stairs[0] == 0 and stairs[1] == 0:
		return 'NO'
	elif stairs[0] == stairs[1]:
		return 'YES'
	elif stairs[0] < 0 or stairs[1] < 0:
		return 'NO'
	elif stairs[1] - stairs[0] == 1 or stairs[0] - stairs[1] == 1:
		return 'YES'
	else:
		return 'NO'
A = dasha_stairs()
print(A)


R = lambda : map(int, input().split())
(n, l) = R()
if (n != 0 or l != 0) and (n - l == 0 or n - l == -1 or n - l == 1):
	print('YES')
else:
	print('NO')


ab = input()
ab = list(map(int, ab.split()))
if ab[0] + ab[1] == 0:
	print('NO')
elif ab[1] - ab[0] == 0 or ab[1] - ab[0] == 1 or ab[1] - ab[0] == -1:
	print('YES')
else:
	print('NO')


(a, b) = [int(i) for i in input().split()]
if a == 0 and b == 0:
	print('NO')
elif max(a, b) - min(a, b) < 2:
	print('YES')
elif max(a, b) - min(a, b) >= 2:
	print('NO')


(a, b) = map(int, input().split())
if a == b == 0:
	print('NO')
	exit()
print(['NO', 'YES'][abs(a - b) <= 1])


(l, r) = map(int, input().split(' '))
a = 0
b = 0
c = 0
d = 0
if l + r > 0:
	for i in range(1, l + r + 1):
		if i % 2 == 0:
			a = a + 1
		if i % 2 == 1:
			b = b + 1
	for i in range(2, l + r + 2):
		if i % 2 == 0:
			c = c + 1
		if i % 2 == 1:
			d = d + 1
	if a == l and b == r or (c == l and d == r):
		print('YES')
	else:
		print('NO')
else:
	print('NO')


_in = input().split(' ')
a = int(_in[0])
b = int(_in[1])
if (a <= b and b - a < 2 or (b <= a and a - b < 2)) and a + b > 0:
	print('YES')
else:
	print('NO')


(n1, m1) = map(int, input().split(' '))
if n1 == 0 and m1 == 0:
	print('NO')
elif abs(n1 - m1) > 1:
	print('NO')
else:
	print('YES')


def solve():
	(n, k) = map(int, input().split())
	if not n and (not k):
		return 'NO'
	if abs(n - k) <= 1:
		return 'YES'
	else:
		return 'NO'
print(solve())


def ans(a, b):
	if a is 0 and b is 0:
		return 'NO'
	if abs(a - b) > 1:
		return 'NO'
	else:
		return 'YES'
(a, b) = list(map(int, input().strip().split(' ')))
print(ans(a, b))


def main():
	from sys import stdin, stdout
	(a, b) = map(int, stdin.readline().split())
	if a and b:
		if abs(a - b) > 1:
			stdout.write('NO')
		else:
			stdout.write('YES')
	elif abs(a - b) > 1:
		stdout.write('NO')
	elif a or b:
		stdout.write('YES')
	else:
		stdout.write('NO')
main()


(o, e) = [int(x) for x in input().split()]
print(['NO', 'YES'][abs(o - e) <= 1 and o + e > 0])


import os
LOCAL_PC = 'n1amr' in os.path.expanduser('~')

def process_file(in_name, out_name):
	with open(in_name, 'r') as fin:
		with open(out_name, 'w') as fout:

			def read():
				return fin.readline().rstrip('\n')

			def write(*args, end='\n'):
				text = ' '.join(map(str, args)) + end
				fout.write(text)
				print(text, end='')
			t = int(fin.readline())
			for i in range(t):
				read()
				write('Case #{T}: \n'.format(T=i + 1), end='')
				solve(read, write)
				write()

def process_stdio():

	def read():
		return input()

	def write(*args, end='\n'):
		print(*args, end=end)
	solve(read, write)

def solve(input, print):
	(a, b) = map(int, input().split())
	diff = abs(a - b)
	if diff < 2 and a + b != 0:
		print('YES')
	else:
		print('NO')
if LOCAL_PC:
	in_name = __file__[:-3] + '.in'
	out_name = __file__[:-3] + '.out'
	process_file(in_name, out_name)
else:
	process_stdio()


class CodeforcesTask761ASolution:

	def __init__(self):
		self.result = ''
		self.a_b = []

	def read_input(self):
		self.a_b = [int(x) for x in input().split(' ')]

	def process_task(self):
		self.result = 'YES' if abs(self.a_b[0] - self.a_b[1]) <= 1 and sum(self.a_b) else 'NO'

	def get_result(self):
		return self.result
Solution = CodeforcesTask761ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


(a, b) = [int(x) for x in input().split()]
print(['YES', 'NO'][abs(a - b) > 1 or (a == 0 and b == 0)])


s = [int(n) for n in input().split()]
if abs(s[0] - s[1]) <= 1 and s.count(0) != 2:
	print('YES')
else:
	print('NO')


import sys
inf = float('inf')
from math import ceil, floor, log, log2, sqrt, factorial, pow, pi, gcd
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
(mod, MOD) = (1000000007, 998244353)
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
(a, b) = get_ints()
if a == 0 and b == 0:
	print('NO')
	exit()
if abs(a - b) <= 1:
	print('YES')
else:
	print('NO')


(a, b) = input().split()
a = int(a)
b = int(b)
if abs(a - b) <= 1 and (a or b):
	print('YES')
else:
	print('NO')


(i, j) = map(int, input().split())
if abs(i - j) <= 1 and (i != 0 or j != 0):
	print('YES')
else:
	print('NO')


import math
import sys
(a, b) = input().split()
a = int(a)
b = int(b)
if a == 0 and b == 0:
	print('NO')
	sys.exit()
if a >= b:
	if a - b > 1:
		print('NO')
	else:
		print('YES')
elif b - a > 1:
	print('NO')
else:
	print('YES')


import os
import sys
from math import ceil, gcd
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	(e, o) = map(int, input().split())
	if abs(e - o) == 1 or (abs(e - o) == 0 and e > 0 and (o > 0)):
		print('YES')
	else:
		print('NO')
main()


(a, b) = map(int, input().split())
print('NYOE S'[(abs(a - b) < 2) * (a + b > 0)::2])


(n, k) = list(map(int, input().split()))
if max(n, k) != 0:
	if abs(n - k) <= 1:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


(n, m) = map(int, input().split())
z = abs(n - m)
if z == 0 and n != 0 or z == 1:
	print('YES')
else:
	print('NO')


(a, b) = map(int, input().split())

def decide():
	if a == b == 0:
		print('NO')
		return
	print('YES' if abs(a - b) <= 1 else 'NO')
decide()


(n, m) = map(int, input().split())
if n > m:
	a = n - m
else:
	a = m - n
if a > 1:
	print('NO')
elif a == 0 and (m == 0 or n == 0):
	print('NO')
else:
	print('YES')


(x, y) = map(int, input().split())
if abs(x - y) >= 2:
	print('NO')
elif x == 0 and y == 0:
	print('NO')
else:
	print('YES')


import sys
Input = sys.stdin.readline
(a, b) = map(int, Input().split())
if a + b > 0 and abs(a - b) <= 1:
	exit(print('YES'))
print('NO')


import sys
(a, b) = map(int, input().split())
if a == 0 and b == 0:
	print('NO')
	sys.exit()
if abs(a - b) <= 1:
	print('YES')
else:
	print('NO')


def f(l):
	(a, b) = l
	return (b == a + 1 or b == a or b == a - 1) and a + b > 0
l = list(map(int, input().split()))
print('YES' if f(l) else 'NO')


(x, y) = [int(i) for i in input().split()]
if x == y and x == 0:
	print('NO')
elif abs(x - y) == 1 or abs(x - y) == 0:
	print('YES')
else:
	print('NO')


def interval(odd, even):
	if odd == 0 and even == 0:
		return 'NO'
	elif abs(odd - even) > 1:
		return 'NO'
	else:
		return 'YES'
(odd, even) = list(map(int, input().split()))
print(interval(odd, even))


(a, b) = [int(x) for x in input().split()]
if a == 0 and b == 0:
	print('NO')
	exit(0)
if a > b + 1 or b > a + 1:
	print('NO')
else:
	print('YES')


(s, b) = [int(i) for i in input().split()]
if s == 0 and b == 0:
	print('NO')
elif s <= b:
	if b - s <= 1:
		print('YES')
	else:
		print('NO')
elif s - b <= 1:
	print('YES')
else:
	print('NO')


import math
import itertools
import sys
import collections
import bisect
from decimal import *
files = False
if files:
	name = 'factorial'
	sys.stdin = open('input.txt')
	sys.stdout = open('output.txt', mode='w')

def ria():
	return [int(i) for i in input().split()]

def bin_s(xp, xc, yc, rc):
	rc **= 2
	r = yc + rc
	l = yc
	while l + 1 < r:
		m = (l + r) // 2
		if (xp - xc) ** 2 + (m - yc) ** 2 > rc:
			r = m
		elif (xp - xc) ** 2 + (1 + m - yc) ** 2 <= rc:
			l = m
		else:
			return m - yc
	if abs(complex(xp - xc, r - yc)):
		return r - yc
	else:
		return l - yc
(n, m) = ria()
if n == 0 and m == 0:
	print('NO')
	exit(0)
if abs(n - m) > 1:
	print('NO')
else:
	print('YES')
sys.stdout.close()


def compute():
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		return 'NO'
	if abs(a - b) <= 1:
		return 'YES'
	else:
		return 'NO'
print(compute())


in1 = input().split()
(a, b) = (int(in1[0]), int(in1[1]))
if abs(a - b) > 1 or (not a and (not b)):
	print('NO')
else:
	print('YES')


def list_from_input():
	return list(map(int, input().split()))

def main():
	(a, b) = list_from_input()
	correct_interval = abs(a - b) <= 1
	invalid_count = a == 0 and b == 0
	if correct_interval and (not invalid_count):
		print('YES')
	else:
		print('NO')
main()


def R():
	return map(int, input().split())

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
(a, b) = R()
print(['NO', 'YES'][abs(a - b) <= 1 and a + b > 0])


import sys
c = list(map(int, input().split(' ')))
if c[0] == c[1] == 0:
	print('NO')
	sys.exit()
if c[0] == c[1] or c[0] == c[1] + 1 or c[0] == c[1] - 1:
	print('YES')
else:
	print('NO')


(x, y) = input().split()
(x, y) = (int(x), int(y))
if x == 0 and y == 0 or abs(x - y) >= 2:
	print('NO')
elif abs(x - y) < 2:
	print('YES')


import math
(n, k) = map(int, input().split())
if abs(n - k) <= 1 and (n > 0 or k > 0):
	print('YES')
else:
	print('NO')


(a, b) = list(map(int, input().split()))
if abs(a - b) < 2 and (a or b):
	print('YES')
else:
	print('NO')


def main():
	(even, odd) = map(int, input().split())
	sum = even + odd
	if abs(even - odd) > 1 or even == odd == 0:
		print('NO')
	else:
		print('YES')
main()


(a, b) = map(int, input().split(' '))
l = 0
if a == b or a == b - 1 or b == a - 1:
	if a + b != 0:
		print('YES')
		l = l + 1
if l == 0:
	print('NO')


def solve():
	(a, b) = [int(x) for x in input().split()]
	if abs(a - b) > 1 or a == b == 0:
		return 'NO'
	else:
		return 'YES'
print(solve())


p = input().rstrip().split(' ')
a = int(p[0])
b = int(p[1])
if a == b and a != 0 and (b != 0) or a + 1 == b or b + 1 == a:
	print('YES')
else:
	print('NO')


def distance(x, y):
	if x >= y:
		result = x - y
	else:
		result = y - x
	return result
(x, y) = input().split()
x = int(x)
y = int(y)
z = distance(x, y)
if x == 0 and y == 0:
	print('NO')
elif z < 2:
	print('YES')
else:
	print('NO')


(a, b) = map(int, input().split())

def prb():
	intlen = a + b
	if intlen == 0:
		print('NO')
		return
	if a == b or a == b + 1 or a + 1 == b:
		print('YES')
		return
	print('NO')
	return
prb()


(a, b) = str(input()).split()
(a, b) = (int(a), int(b))
if -1 <= a - b <= 1 and a + b > 0:
	print('YES')
else:
	print('NO')


import sys
A = [int(a) for a in input().strip().split()]
if A[0] == 0 and A[1] == 0:
	print('NO')
elif abs(A[1] - A[0]) == 0 or abs(A[1] - A[0]) == 1:
	print('YES')
else:
	print('NO')


def codeforces(a, b):
	if a == b == 0 or abs(a - b) > 1:
		return 'NO'
	else:
		return 'YES'
(a, b) = map(int, input().split())
print(codeforces(a, b))


def dasha_and_lest(a, b):
	if abs(a - b) > 1:
		return 'NO'
	elif a == b and a != 0 and (b != 0):
		return 'YES'
	elif a == b == 0:
		return 'NO'
	else:
		return 'YES'
(c, d) = [int(i) for i in input().split()]
print(dasha_and_lest(c, d))


[a, b] = [int(x) for x in input().split()]
if abs(a - b) <= 1 and (not (a == 0 and b == 0)):
	print('YES')
else:
	print('NO')


import os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
(a, b) = rm()
if a == 0 and b == 0:
	print('NO')
elif abs(a - b) <= 1:
	print('YES')
else:
	print('NO')


x = input().split()
a = int(x[0])
b = int(x[1])
c = a + b
if a == 0 and b == 0:
	print('NO')
elif abs(a - b) <= 1:
	print('YES')
else:
	print('NO')


from __future__ import division, print_function
from collections import *
from math import *
from itertools import *
import os
import sys
from io import BytesIO, IOBase
import math
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def main():
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		print('NO')
	elif abs(a - b) > 1:
		print('NO')
	else:
		print('YES')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(n, k) = input().split()
n = int(n)
k = int(k)
if n == 0 and k == 0:
	print('NO')
elif abs(n - k) <= 1:
	print('YES')
else:
	print('NO')


A = list(map(int, input().split()))
if A[0] == 0 and A[1] == 0:
	print('NO')
elif A[0] - 1 == A[1] or A[0] + 1 == A[1] or A[0] == A[1]:
	print('YES')
else:
	print('NO')


(n, m) = list(map(int, input().split()))
if n + 1 == m or n - 1 == m or n == m:
	if n == 0 and m == 0:
		print('NO')
	else:
		print('YES')
else:
	print('NO')


from collections import deque, Counter
import array
from itertools import combinations, permutations
from math import sqrt

def read_int():
	return int(input().strip())

def read_int_array():
	return [int(i) for i in input().strip().split(' ')]
(a, b) = read_int_array()
print('YES' if a + b > 0 and abs(a - b) <= 1 else 'NO')


(a, b) = (int(z) for z in input().split())
if a - b in [0, 1, -1] and a + b > 0 and (a >= 0) and (b >= 0):
	print('YES')
else:
	print('NO')


(n, k) = [int(i) for i in input().split()]
if abs(n - k) <= 1:
	if n == k == 0:
		print('NO')
	else:
		print('YES')
else:
	print('NO')


s = list(map(int, input().split()))
a = s[0]
b = s[1]
ab = a + 1
bb = b + 1
if b > ab:
	print('NO')
elif a > bb:
	print('NO')
elif a == 0 and b == 0:
	print('NO')
else:
	print('YES')


(a, b) = [int(item) for item in input().split()]
if abs(a - b) in [0, 1] and (a, b) != (0, 0):
	print('YES')
else:
	print('NO')


def main():
	(a, b) = [int(c) for c in input().split()]
	print('YES' if a == b and a != 0 or abs(a - b) == 1 else 'NO')
main()