Mishka is decorating the Christmas tree. He has got three garlands, and all of them will be put on the tree. After that Mishka will switch these garlands on.

When a garland is switched on, it periodically changes its state — sometimes it is lit, sometimes not. Formally, if i-th garland is switched on during x-th second, then it is lit only during seconds x, x + k_{i}, x + 2k_{i}, x + 3k_{i} and so on.

Mishka wants to switch on the garlands in such a way that during each second after switching the garlands on there would be at least one lit garland. Formally, Mishka wants to choose three integers x_1, x_2 and x_3 (not necessarily distinct) so that he will switch on the first garland during x_1-th second, the second one — during x_2-th second, and the third one — during x_3-th second, respectively, and during each second starting from max(x_1, x_2, x_3) at least one garland will be lit.

Help Mishka by telling him if it is possible to do this!


-----Input-----

The first line contains three integers k_1, k_2 and k_3 (1 ≤ k_{i} ≤ 1500) — time intervals of the garlands.


-----Output-----

If Mishka can choose moments of time to switch on the garlands in such a way that each second after switching the garlands on at least one garland will be lit, print YES.

Otherwise, print NO.


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

Output
YES

Input
4 2 3

Output
NO



-----Note-----

In the first example Mishka can choose x_1 = 1, x_2 = 2, x_3 = 1. The first garland will be lit during seconds 1, 3, 5, 7, ..., the second — 2, 4, 6, 8, ..., which already cover all the seconds after the 2-nd one. It doesn't even matter what x_3 is chosen. Our choice will lead third to be lit during seconds 1, 4, 7, 10, ..., though.

In the second example there is no way to choose such moments of time, there always be some seconds when no garland is lit.

Difficulty: MEDIUM
Tags: Complete search

Constructive algorithms
Skill types: Complete search
Expected Time Complexity: O(1)

Starter code:

Solutions:
(k1, k2, k3) = map(int, input().split())
if k1 == 1 or k2 == 1 or k3 == 1 or (k1 == 2 and k2 == 2) or (k2 == 2 and k3 == 2) or (k1 == 2 and k3 == 2) or (k1 == 3 and k2 == 3 and (k3 == 3)):
	print('YES')
elif k1 == 2 and k2 == 4 and (k3 == 4) or (k1 == 4 and k2 == 2 and (k3 == 4)) or (k1 == 4 and k2 == 4 and (k3 == 2)):
	print('YES')
else:
	print('NO')


from collections import Counter
(k1, k2, k3) = (int(x) for x in input().split())
cnt = Counter([k1, k2, k3])
if cnt[1] > 0:
	print('YES')
elif cnt[2] > 1:
	print('YES')
elif cnt[3] > 2:
	print('YES')
elif cnt[2] == 1 and cnt[4] == 2:
	print('YES')
else:
	print('NO')


import math
(x1, x2, x3) = map(int, input().split())
kmm = math.gcd(x1, math.gcd(x2, x3))
a = [x1, x2, x3]
a.sort()
if min(a) >= 4:
	print('NO')
elif min(a) == 3:
	if max(a) == 3:
		print('YES')
	else:
		print('NO')
elif min(a) == 1:
	print('YES')
elif min(a) == 2:
	if a.count(2) >= 2:
		print('YES')
	elif a == [2, 4, 4]:
		print('YES')
	else:
		print('NO')


A = list(map(int, input().split()))
A.sort()
if A[0] == 1:
	print('YES')
elif A.count(2) >= 2:
	print('YES')
elif A.count(3) >= 3:
	print('YES')
elif A[0] == 2 and A.count(4) == 2:
	print('YES')
else:
	print('NO')


k = sorted([int(s) for s in input().split()])
c = k[0] == 1 or (k[0] == 2 and k[1] == 2) or set(k) == {3, 3, 3} or (set(k) == {2, 4, 4})
print('YES' if c else 'NO')


a = [int(s) for s in input().split()]
a.sort()
if a[0] == 1 or (a[0] == 2 and a[1] == 2) or (a[0] == 2 and a[1] == a[2] == 4) or (a[0] == a[1] == a[2] == 3):
	print('YES')
else:
	print('NO')


import sys
input = sys.stdin.buffer.readline
from itertools import permutations
k = list(map(int, input().split()))
worked = 0
for (k1, k2, k3) in permutations(k):
	worked2 = 1
	for t in range(10000):
		if not (t % k1 == 0 or t % k2 == 1 or t % k3 == 2):
			worked2 = 0
	if worked2:
		worked = 1
		break
if worked:
	print('YES')
else:
	print('NO')


lst = [int(i) for i in input().split()]
lst.sort()
e = min(lst)
flag = False
if e == 1:
	flag = True
elif e == 2:
	if lst[1] == 2:
		flag = True
	elif lst[1] == 4 and lst[2] == 4:
		flag = True
elif lst[0] == 3 and lst[2] == 3:
	flag = True
if flag:
	print('YES')
else:
	print('NO')


(a, b, c) = sorted(list(map(int, input().split())))
(j, k) = (-1, -1)
for i in range(0, a):
	if i % a != 0:
		j = i
		break
for i in range(j, max(2 * a, 2 * b)):
	if i % a != 0 and (i - j) % b != 0:
		k = i
		break
i = 0
while True:
	i += 1
	if i % a == 0 and i % b == 0 and (i % c == 0):
		print('YES')
		break
	x = i % a == 0 or (i - j) % b == 0 or (i - k) % c == 0
	if not x:
		print('NO')
		break


k = list(map(int, input().split()))
cnt1 = k.count(1)
cnt2 = k.count(2)
cnt3 = k.count(3)
cnt4 = k.count(4)
if cnt1 >= 1 or cnt2 >= 2 or cnt3 == 3 or (cnt4 == 2 and cnt2 == 1):
	print('YES')
else:
	print('NO')


(a, b, c) = [int(x) for x in input().split()]
arr = sorted([a, b, c])
if arr.count(1) >= 1:
	print('YES')
elif arr.count(2) >= 2:
	print('YES')
elif arr.count(2) == 1 and arr.count(4) == 2:
	print('YES')
elif arr.count(3) == 3:
	print('YES')
else:
	print('NO')


import sys
f = sys.stdin
k_list = list(map(int, f.readline().split()))
cd = {}
for k in k_list:
	if k in cd:
		cd[k] += 1
	else:
		cd[k] = 1
cl = sorted(cd.items(), key=lambda x: -x[0])
for (k, _) in cl:
	c = cd[k]
	for i in range(2, c + 1):
		if k % i == 0:
			nk = k // i
			if nk in cd:
				cd[nk] += 1
			else:
				cd[nk] = 1
if 1 in cd:
	print('YES')
else:
	print('NO')


data = input().split(' ')
k = [int(data[0]), int(data[1]), int(data[2])]
k.sort()
[k1, k2, k3] = k
has_solution = False
if k1 == 1:
	has_solution = True
elif k1 == 2 and k2 == 2:
	has_solution = True
elif k1 == 2 and k2 == 4 and (k3 == 4):
	has_solution = True
elif k1 == 3 and k2 == 3 and (k3 == 3):
	has_solution = True
if has_solution:
	print('YES')
else:
	print('NO')


import sys
(k1, k2, k3) = [int(x) for x in input().split()]

def is_div(a, b):
	return a == a // b * b

def always_lit(x1, x2, k1, k2, k3):
	for i in range(200):
		if not is_div(i - x1, k1) and (not is_div(i - x2, k2)) and (not is_div(i, k3)):
			return False
	return True
for x1 in range(-200, 1):
	for x2 in range(x1, 1):
		if always_lit(x1, x2, k1, k2, k3):
			print('YES')
			return
print('NO')


xs = [int(x) for x in input().split()]
can = 1 in xs
can |= xs.count(2) >= 2
can |= xs.count(2) == 1 and xs.count(4) == 2
can |= xs == [3, 3, 3]
print('YES' if can else 'NO')


(k1, k2, k3) = input().split()
b = False
A = []
A.append(int(k1))
A.append(int(k2))
A.append(int(k3))
A.sort()
if A[0] == 1:
	b = True
if A[0] == 2:
	if A[1] == 4 and A[2] == 4:
		b = True
	if A[1] == 2 or A[2] == 2:
		b = True
if A[0] == 3 and A[1] == 3 and (A[2] == 3):
	b = True
if b == True:
	print('YES')
else:
	print('NO')


def lInt(d=None):
	return map(int, input().split(d))
arr = list(lInt())
x4 = 0
x3 = 0
x2 = 0
x1 = 0
for v in arr:
	if v == 4:
		x4 += 1
	if v == 3:
		x3 += 1
	if v == 2:
		x2 += 1
	if v == 1:
		x1 += 1
if x1:
	print('YES')
	exit(0)
if x2 > 1:
	print('YES')
	exit(0)
if x3 == 3:
	print('YES')
	exit(0)
if x4 == 2 and x2:
	print('YES')
	exit(0)
print('NO')
exit(0)


(k1, k2, k3) = map(int, input().split())
a = [0] * 1510
a[k1] += 1
a[k2] += 1
a[k3] += 1
if a[1] >= 1 or a[2] >= 2 or a[3] >= 3 or (a[4] == 2 and a[2] == 1):
	print('YES')
else:
	print('NO')


k = sorted([int(x) for x in input().split()])
if k[0] == 1 or k[0] == k[1] == 2 or k[0] == k[2] == 3 or (k[0] == 2 and k[1] == k[2] == 4):
	print('YES')
else:
	print('NO')


import sys
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
(k1, k2, k3) = invr()
for x1 in range(1, 1200):
	for x2 in range(1, 1200):
		ache = [0] * 105
		now = x1
		while now < 105:
			ache[now] = 1
			now += k1
		now = x2
		while now < 105:
			ache[now] = 1
			now += k2
		baki = []
		for i in range(1, 105):
			if ache[i] == 0:
				baki.append(i)
		if len(baki) < 2:
			print('YES')
			exit(0)
		else:
			flag = True
			for i in range(1, len(baki)):
				flag &= (baki[i] - baki[i - 1]) % k3 == 0
				if not flag:
					break
			if flag:
				print('YES')
				exit(0)
print('NO')


from math import gcd

def lcm(a, b):
	return a * b // gcd(a, b)

def lcm1(a, b, c):
	return lcm(lcm(a, b), c)
(a, b, c) = list(map(int, input().split()))
x = [a, b, c]
x.sort()
(a, b, c) = x
ar = [0] * 10 ** 5
for i in range(0, 10 ** 5, a):
	ar[i] = 1
for i in range(1, 10 ** 5, b):
	ar[i] = 1
fl = 0
while fl < 10 ** 5 and ar[fl] == 1:
	fl += 1
for i in range(fl, 10 ** 5, c):
	ar[i] = 1
if 0 in ar:
	print('NO')
else:
	print('YES')


A = list(map(int, input().split()))
cnt = [A.count(1), A.count(2), A.count(3), A.count(4)]
if cnt[0] >= 1 or cnt[1] >= 2 or cnt[2] >= 3 or (cnt[1] == 1 and cnt[3] == 2):
	print('YES')
else:
	print('NO')


(k1, k2, k3) = map(int, input().split())
(x1, x2, x3) = (0, 0, 0)
for i in range(4):
	for j in range(4):
		for k in range(4):
			fl = 1
			for t in range(1, 1502):
				if not (t % k1 == (i + 1) % k1 or t % k2 == (j + 1) % k2 or t % k3 == (k + 1) % k3):
					fl = 0
			if fl:
				(x1, x2, x3) = (i + 1, j + 1, k + 1)
if x1 + x2 + x3 != 0:
	print('YES')
else:
	print('NO')


arr = list(map(int, input().split()))
if 1 in arr:
	print('YES')
elif arr.count(2) >= 2:
	print('YES')
elif arr.count(3) == 3:
	print('YES')
elif arr.count(4) == 2 and arr.count(2) == 1:
	print('YES')
else:
	print('NO')


def y():
	print('YES')

def n():
	print('NO')
k = list(map(int, input().split(' ')))
k = sorted(k)
if k[0] == 1:
	y()
elif k[0] == 2 and k[1] == 2:
	y()
elif k[0] == 3 and k[1] == 3 and (k[2] == 3):
	y()
elif k[0] == 2 and k[1] == 4 and (k[2] == 4):
	y()
else:
	n()


MOD = 1000000007
MOD2 = 998244353
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
(k1, k2, k3) = sorted(f())
if k1 == 1 or k1 == k2 == 2 or k1 == k2 == k3 == 3 or ((k1, k2, k3) == (2, 4, 4)):
	print('YES')
else:
	print('NO')


k = [int(x) for x in input().split()]
print(['NO', 'YES'][k.count(1) > 0 or k.count(2) > 1 or k.count(3) > 2 or (sorted(k) == [2, 4, 4])])


a = [int(i) for i in input().split()]
if a.count(1) > 0 or a.count(2) > 1 or a.count(3) > 2 or (a.count(2) == 1 and a.count(4) == 2):
	print('YES')
else:
	print('NO')


k = list(map(int, input().split()))
if k.count(1) >= 1 or k.count(2) >= 2 or k.count(3) >= 3 or (k.count(2) == 1 and k.count(4) == 2):
	print('YES')
else:
	print('NO')


lst = []
for x in input().split():
	lst.append(int(x))
lst.sort()
if lst.count(1) >= 1 or lst.count(2) >= 2 or lst.count(3) >= 3 or (lst == [2, 4, 4]):
	print('YES')
else:
	print('NO')


a = sorted(map(int, input().split()))
print('YES' if a.count(1) or a.count(2) > 1 or a.count(3) > 2 or (a == [2, 4, 4]) else 'NO')


l = input()
l = [int(i) for i in l.split()]
if l.count(3) == 3:
	print('YES')
elif l.count(2) >= 2:
	print('YES')
elif l.count(1) >= 1:
	print('YES')
elif l.count(4) == 2 and l.count(2) == 1:
	print('YES')
else:
	print('NO')


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
from functools import lru_cache
int1 = lambda x: int(x) - 1
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
aj = lambda : list(map(int, input().split()))

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])

def fun(A):
	for i in range(len(A)):
		if A[i] == 0:
			return i
	return 1
dp = [0] * 10
A = aj()
A.sort()
(k1, k2, k3) = A
for i in range(0, 10, k1):
	dp[i] = 1
for i in range(fun(dp), 10, k2):
	dp[i] = 1
for i in range(fun(dp), 10, k3):
	dp[i] = 1
Y(0 not in dp)


import sys, math, itertools
from collections import Counter, deque, defaultdict
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush, heapify
from copy import deepcopy
mod = 10 ** 9 + 7
INF = float('inf')

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

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

def inpl_1():
	return list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))

def inps():
	return sys.stdin.readline()

def inpsl(x):
	tmp = sys.stdin.readline()
	return list(tmp[:x])

def err(x):
	print(x)
	exit()
k = inpl()
k.sort()
if k.count(1) >= 1 or k.count(2) >= 2 or k.count(3) >= 3 or (k == [2, 4, 4]):
	print('YES')
else:
	print('NO')


(k1, k2, k3) = list(map(int, input().split()))
L = [k1, k2, k3]
if L.count(1) != 0:
	print('YES')
elif L.count(2) >= 2:
	print('YES')
elif L.count(3) == 3:
	print('YES')
elif L.count(4) == 2 and L.count(2) == 1:
	print('YES')
else:
	print('NO')


import sys
a = [int(x) for x in input().split()]
a = sorted(a)
if 1 in a or a == [2, 4, 4] or a == [3, 3, 3]:
	print('YES')
	sys.exit()
elif a[0] == 2 and a[1] == 2:
	print('YES')
	sys.exit()
print('NO')


l = [0, 0, 0, 0, 0]
for i in filter(lambda x: x < 5, map(int, input().split(' '))):
	l[i] += 1
if any((l[i] >= i for i in range(1, 4))) or (l[2] == 1 and l[4] == 2):
	print('YES')
else:
	print('NO')


(a, b, c) = list(map(int, input().split()))
if a == 1 or b == 1 or c == 1:
	print('YES')
elif a == 3 and b == 3 and (c == 3):
	print('YES')
else:
	l = {}
	l[2] = 0
	l[4] = 0
	l[a] = 0
	l[b] = 0
	l[c] = 0
	l[a] += 1
	l[b] += 1
	l[c] += 1
	if l[2] >= 2:
		print('YES')
	elif l[2] == 1 and l[4] == 2:
		print('YES')
	else:
		print('NO')


ks = [int(i) for i in input().split(' ')]
possible = False
for i in range(3):
	if ks.count(i + 1) > i:
		possible = True
if ks.count(4) == 2 and ks.count(2) == 1:
	possible = True
if possible:
	print('YES')
else:
	print('NO')


a = list(map(int, input().split(' ')))
a.sort()
if a[0] == 1 or a[0] == a[1] == 2 or a[0] == a[1] == a[2] == 3 or (a[0] == 2 and a[1] == a[2] == 4):
	print('YES')
else:
	print('NO')


import math

def main():
	(a, b, c) = map(int, input().split())
	if a == 1 or b == 1 or c == 1:
		print('YES')
		return
	if a == 3 and b == 3 and (c == 3):
		print('YES')
		return
	if a == 2 and b == 2 or (a == 2 and c == 2) or (b == 2 and c == 2):
		print('YES')
		return
	if min(a, b, c) == 2 and max(a, b, c) == 4 and (a + b + c - 2 - 4 == 4):
		print('YES')
		return
	print('NO')
	return
main()


from collections import defaultdict as dd
from collections import Counter as ccd
from itertools import permutations as pp
from itertools import combinations as cc
from random import randint as rd
from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq as hq
from math import gcd
mod = pow(10, 9) + 7

def inp(flag=0):
	if flag == 0:
		return list(map(int, input().strip().split(' ')))
	else:
		return int(input())
(k1, k2, k3) = inp()
possible = False
l = sorted([k1, k2, k3])
if 1 in l:
	possible = True
elif l.count(2) >= 2:
	possible = True
elif l == [2, 4, 4] or l == [3, 3, 3]:
	possible = True
if possible:
	print('YES')
else:
	print('NO')


garlands = sorted([int(r) for r in input().split(' ')])
if garlands[0] == 1:
	print('YES')
elif garlands[0:2] == [2, 2]:
	print('YES')
elif garlands in ([3, 3, 3], [2, 4, 4]):
	print('YES')
elif 1 / garlands[0] + 1 / garlands[1] + 1 / garlands[2] >= 1:
	tape = [0] * (garlands[0] * garlands[1] * garlands[2])
	a = 0
	for b in range(garlands[1]):
		for c in range(garlands[2]):
			state = 1
			for i in range(len(tape)):
				if i % garlands[0] != a or i % garlands[1] != b or i % garlands[2] != c:
					state = 0
			if state == 1:
				print('YES')
				exit()
	print('NO')
else:
	print('NO')


(k1, k2, k3) = map(int, input().split(' '))
if k1 == 1 or k2 == 1 or k3 == 1:
	print('YES')
else:
	arr = [k1, k2, k3]
	arr.sort()
	ans = [0] * 21
	for i in range(2):
		j = i + 1
		while j <= 20:
			ans[j] = 1
			j += arr[i]
	a = []
	for i in range(1, 21):
		if ans[i] == 0:
			a.append(i)
	if len(a) == 0:
		print('YES')
	elif a[1] - a[0] == arr[-1]:
		print('YES')
	else:
		print('NO')


a = [int(x) for x in input().split(' ')]
a.sort()
flag = 0
if a[0] == 1:
	flag = 1
elif a[0] == 2:
	if a[1] == 2:
		flag = 1
	if a[1] == 4:
		if a[2] == 4:
			flag = 1
elif a[0] == 3:
	if a[1] == 3:
		if a[2] == 3:
			flag = 1
if flag == 1:
	print('YES')
else:
	print('NO')


intervals = list(map(int, input().split()))
intervals.sort()
if intervals[0] == 1:
	print('YES')
	exit()
if intervals[0] == 2 and intervals[1] == 2:
	print('YES')
	exit()
if intervals[2] >= 5:
	print('NO')
	exit()
time = list()
for i in range(intervals[-1] * 2 + 1):
	time.append(0)
for it in intervals:
	for i in range(len(time)):
		if time[i] == 0:
			time[i] = 1
			end = 0
			index = i
			while end == 0:
				try:
					index += it
					time[index] = 1
				except Exception:
					end = 1
			break
if 0 in time:
	print('NO')
else:
	print('YES')


l = list(map(int, input().split()))
if 1 in l:
	print('YES')
elif 2 in l and l.count(2) >= 2:
	print('YES')
elif 3 in l and l.count(3) >= 3:
	print('YES')
else:
	m = sorted(l)
	if m[0] == 2 and m[1] == 4 and (m[2] == 4):
		print('YES')
	else:
		print('NO')


(k, m, n) = map(int, input().split())
mn = min(k, min(m, n))
ma = max(k, max(m, n))
me = k + m + n - mn - ma
if mn == 1 or mn == me == 2 or (mn == 2 and me == ma == 4) or (mn == ma == me == 3):
	print('YES')
else:
	print('NO')


R = lambda : list(map(int, input().split()))
a = R()
if 1 in a:
	print('YES')
elif a.count(2) >= 2:
	print('YES')
elif a.count(3) == 3:
	print('YES')
elif a.count(4) == 2 and a.count(2) == 1:
	print('YES')
else:
	print('NO')


R = lambda : map(int, input().split())
a = list(R())
ans = 0
o = a.count(1)
t = a.count(2)
th = a.count(3)
f = a.count(4)
if o > 0 or t > 1 or th > 2 or (t == 1 and f == 2):
	print('YES')
else:
	print('NO')


(a, b, c) = [int(i) for i in input().split()]
l = [a, b, c]
l.sort()
if a == 1 or b == 1 or c == 1:
	print('YES')
elif a == 2 and b == 2 or (a == 2 and c == 2) or (b == 2 and c == 2):
	print('YES')
elif a == 3 and b == 3 and (c == 3):
	print('YES')
elif l[0] == 2 and l[1] == 4 and (l[2] == 4):
	print('YES')
else:
	print('NO')


(k1, k2, k3) = [int(x) for x in input().split()]
if k1 == 1 or k2 == 1 or k3 == 1:
	print('YES')
elif k1 == 2 and k2 == 2 or (k3 == 2 and k2 == 2) or (k3 == 2 and k1 == 2):
	print('YES')
elif {k1, k2, k3} == {3} or {k1, k2, k3} == {1, 2, 3} or {k1, k2, k3} == {2, 4}:
	print('YES')
else:
	print('NO')


def main():
	nums = list(map(int, input().split()))
	(a, b, c) = (nums[0], nums[1], nums[2])
	valid = set()
	if a == 1 or b == 1 or c == 1:
		print('YES')
		return
	elif a == 2 and b == 2 or (b == 2 and c == 2) or (a == 2 and c == 2):
		print('YES')
		return
	x = [(3, 3, 3), (2, 4, 4)]
	for y in x:
		valid.add(y)
	gg = [a, b, c]
	gg.sort()
	gg = tuple(gg)
	if gg in valid:
		print('YES')
	else:
		print('NO')
main()


(k1, k2, k3) = sorted(list(map(int, input().split())))[::-1]
b = k3 == 1 or (k1 == 3 and k2 == 3 and (k3 == 3)) or (k3 == 2 and (k2 == 2 or (k2 == 4 and k1 == 4)))
print('YES' if b else 'NO')


import sys
import math
import collections
from pprint import pprint as pp
mod = 998244353
MAX = 10 ** 10

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

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

def vector(size, val=0):
	vec = [val for i in range(size)]
	return vec

def matrix(rowNum, colNum, val=0):
	mat = []
	for i in range(rowNum):
		collumn = [val for j in range(colNum)]
		mat.append(collumn)
	return mat
a = array()
if a.count(1) >= 1:
	print('YES')
elif a.count(2) >= 2:
	print('YES')
elif a.count(3) == 3:
	print('YES')
elif a.count(2) == 1 and a.count(4) == 2:
	print('YES')
else:
	print('NO')


arr = list(map(int, input().split()))
ls = sorted(arr)
if ls[0] == 1 or ls[:2] == [2, 2] or ls[:3] == [3, 3, 3] or (ls[:3] == [2, 4, 4]):
	print('YES')
else:
	print('NO')


ip = [int(i) for i in input().split()]
ip.sort()
a = ip[0]
b = ip[1]
c = ip[2]
arr = [False] * 1500
for i in range(1500):
	if arr[i] == False:
		for j in range(i, 1500, a):
			arr[j] = True
	break
for i in range(1500):
	if arr[i] == False:
		for j in range(i, 1500, b):
			arr[j] = True
		break
for i in range(1500):
	if arr[i] == False:
		for j in range(i, 1500, c):
			arr[j] = True
		break
flag = True
for i in range(1500):
	if arr[i] == False:
		flag = False
		break
	else:
		continue
if flag:
	print('YES')
else:
	print('NO')


def YES():
	print('YES')
	exit(0)
z = list(map(int, input().split()))
z.sort()
if z[0] == 1:
	YES()
if z[0] == 2 and z[1] == 2:
	YES()
if z.count(3) == 3:
	YES()
if z[0] == 2 and z.count(4) == 2:
	YES()
print('NO')


l = list(map(int, input().split()))
l.sort()
(a, b, c) = l
if a == 1:
	print('YES')
elif a == 2:
	if b == 2:
		print('YES')
	elif b == c == 4:
		print('YES')
	else:
		print('NO')
elif a == b == c == 3:
	print('YES')
else:
	print('NO')


(k1, k2, k3) = list(map(int, input().strip().split()))
import sys

def gcd(a, b):
	if b > a:
		return gcd(b, a)
	if a % b == 0:
		return b
	return gcd(b, a % b)
u = min(k1, k2, k3)
sez = [False] * 5000
s = 0
while s < len(sez):
	sez[s] = True
	s += k1
if sez.count(False) == 0:
	print('YES')
	sys.exit(0)
i = sez.index(False)
s2 = sez[:]
s = i
while s < len(sez):
	sez[s] = True
	s += k2
if sez.count(False) == 0:
	print('YES')
	sys.exit(0)
i = sez.index(False)
s = i
while s < len(sez):
	sez[s] = True
	s += k3
if sez.count(False) == 0:
	print('YES')
	sys.exit(0)
i = s2.index(False)
s = i
while s < len(s2):
	s2[s] = True
	s += k3
if s2.count(False) == 0:
	print('YES')
	sys.exit(0)
i = s2.index(False)
s = i
while s < len(s2):
	s2[s] = True
	s += k2
if s2.count(False) == 0:
	print('YES')
	sys.exit(0)
print('NO')


R = lambda : map(int, input().split())
d = sorted(list(R()))
ans = d[0] == 1 or d[0] == d[1] == 2 or (d[0] == 2 and d[1] == d[2] == 4) or (d[0] == d[1] == d[2] == 3)
print('YNEOS'[not ans::2])


def solve(k):
	if min(k) > 3:
		print('NO')
		return
	x = [0, 0, 0]
	for x[0] in range(3):
		for x[1] in range(3):
			for x[2] in range(3):
				a = [False] * 15
				for i in range(3):
					j = 0
					while x[i] + j * k[i] < 15:
						a[x[i] + j * k[i]] = True
						j += 1
				is_possible = True
				for i in range(3, 15):
					is_possible = is_possible and a[i]
				if is_possible:
					print('YES')
					return
	print('NO')
k = list(map(int, input().split()))
solve(k)


a = [int(z) for z in input().split()]
if 1 in a:
	print('YES')
elif a.count(2) >= 2:
	print('YES')
elif a.count(3) == 3:
	print('YES')
elif a.count(2) == 1 and a.count(4) == 2:
	print('YES')
else:
	print('NO')


import sys, os, io
import math, bisect, operator
(inf, mod) = (float('inf'), 10 ** 9 + 7)
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, defaultdict
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
Neo = lambda : list(map(int, input().split()))
A = sorted(Neo())
B = [0] * 100
for i in A:
	j = 0
	for c in range(100):
		if B[c] == 0:
			j = c
			break
	while j < 100:
		B[j] = 1
		j += i
if B.count(0) == 0:
	print('YES')
else:
	print('NO')


(on, tw, th) = map(int, input().split())
b = False
for x in range(80):
	if b:
		break
	for y in range(80):
		if b:
			break
		for z in range(80):
			if b:
				break
			ar = [1] * 100
			for el in range(len(ar)):
				if not (not (el - x + 1) % on or not (el - y + 1) % tw or (not (el - z + 1) % th)):
					break
			else:
				print('YES')
				b = True
				break
else:
	print('NO')


import sys
(k1, k2, k3) = map(int, input().split())
L = [k1, k2, k3]
x = L.count(1)
if x != 0:
	print('YES')
	sys.exit(0)
x = L.count(2)
if x >= 2:
	print('YES')
	sys.exit(0)
x = L.count(3)
if x == 3:
	print('YES')
	sys.exit(0)
if L.count(4) == 2 and L.count(2) == 1:
	print('YES')
	sys.exit(0)
print('NO')


k = map(int, input().split())
k = sorted(k)
if max(k) == 3 and min(k) == 3:
	print('YES')
elif k[0] == 1:
	print('YES')
elif k[0] == 2 and k[1] == 2:
	print('YES')
elif k == [2, 4, 4]:
	print('YES')
else:
	print('NO')


from sys import stdin

def main():
	(k1, k2, k3) = map(int, stdin.readline().split())
	if k1 == 1 or k2 == 1 or k3 == 1:
		print('YES')
	elif k1 == 3 and k2 == 3 and (k3 == 3):
		print('YES')
	else:
		cnt = 0
		if k1 == 2:
			cnt += 1
		if k2 == 2:
			cnt += 1
		if k3 == 2:
			cnt += 1
		if cnt >= 2:
			print('YES')
		elif cnt == 1:
			cnt4 = 0
			if k1 == 4:
				cnt4 += 1
			if k2 == 4:
				cnt4 += 1
			if k3 == 4:
				cnt4 += 1
			if cnt4 == 2:
				print('YES')
			else:
				print('NO')
		else:
			print('NO')
main()


(a, b, c) = sorted(map(int, input().split()))
if a > 3:
	print('NO')
elif a == 3:
	if b > 3:
		print('NO')
	elif b == 3:
		if c > 3:
			print('NO')
		else:
			print('YES')
elif a == 1:
	print('YES')
elif b == 2:
	print('YES')
elif b > 4:
	print('NO')
elif b == 4:
	if c == 4:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


inp = list(map(int, input().split()))
inp.sort()
string = 'NO'
if inp.count(1) >= 1 or inp.count(2) >= 2 or inp.count(3) >= 3:
	string = 'YES'
if inp == [2, 4, 4]:
	string = 'YES'
print(string)


(k1, k2, k3) = map(int, input().split())
if 1 in [k1, k2, k3]:
	print('YES')
elif sum([1 for i in [k1, k2, k3] if i == 2]) >= 2:
	print('YES')
elif sum([1 for i in [k1, k2, k3] if i == 3]) == 3:
	print('YES')
elif sum([1 for i in [k1, k2, k3] if i == 2]) == 1 and sum([1 for i in [k1, k2, k3] if i == 4]) == 2:
	print('YES')
else:
	print('NO')


(a, b, c) = map(int, input().split())
good = False
template = [True if i % a == 0 else False for i in range(3 * max([a, b, c]))]
A = template[:]
i = 0
while i * b + 1 < len(A):
	A[i * b + 1] = True
	i += 1
i = 0
while i < len(A):
	if not A[i]:
		break
	i += 1
j = 0
while j * c + i < len(A):
	A[j * c + i] = True
	j += 1
good = good or all(A)
A = template[:]
i = 0
while i * c + 1 < len(A):
	A[i * c + 1] = True
	i += 1
i = 0
while i < len(A):
	if not A[i]:
		break
	i += 1
j = 0
while j * b + i < len(A):
	A[j * b + i] = True
	j += 1
good = good or all(A)
if good:
	print('YES')
else:
	print('NO')


(k1, k2, k3) = list(map(int, input().split(' ')[:3]))
(k1, k2, k3) = sorted([k1, k2, k3])

def main():
	return k1 == 1 or (k1, k2) == (2, 2) or (k1, k2, k3) == (2, 4, 4) or ((k1, k2, k3) == (3, 3, 3))
print('YES' if main() else 'NO')


k = [int(x) for x in input().split()]
c = 0
for i in range(3):
	if k[i] == 1:
		print('YES')
		c += 1
		break
if k[0] == 3 and k[1] == 3 and (k[2] == 3):
	print('YES')
	c += 1
elif k[0] == 2 and k[1] == 2 or (k[1] == 2 and k[2] == 2) or (k[2] == 2 and k[0] == 2):
	print('YES')
	c += 1
elif k == [2, 4, 4] or k == [4, 4, 2] or k == [4, 2, 4]:
	print('YES')
	c += 1
if c == 0:
	print('NO')


def fill(arr, delta, offset):
	for i in range(offset, len(arr), delta):
		arr[i] = True
(k1, k2, k3) = sorted(list(map(int, input().split())))
if k1 == 1:
	print('YES')
	exit()

def test(k1, k2, k3):
	test_case = [False for _ in range(3 * k3)]
	fill(test_case, k3, 0)
	fill(test_case, k2, 1)
	if False not in test_case:
		print('YES')
		exit()
	f_ind = test_case.index(False)
	fill(test_case, k1, f_ind)
	if False not in test_case:
		print('YES')
		exit()
test(k1, k2, k3)
test(k2, k1, k3)
print('NO')


(a, b, c) = sorted((int(x) for x in input().split()))
if a == 1 or a == b == 2 or a == b == c == 3 or (a == 2 and b == c == 4):
	print('YES')
else:
	print('NO')


def ukrashenie(lst):
	flag = False
	if lst[0] == 1:
		flag = True
	if lst[0] == 2:
		if lst[1] == 4 and lst[2] == 4:
			flag = True
		if lst[1] == 2 or lst[2] == 2:
			flag = True
	if lst[0] == 3 and lst[1] == 3 and (lst[2] == 3):
		flag = True
	if flag is True:
		return 'YES'
	return 'NO'
(k1, k2, k3) = [int(i) for i in input().split()]
print(ukrashenie(sorted([k1, k2, k3])))


(a, b, c) = list(map(int, input().split()))
l = [a, b, c]
if a == b == c and a <= 3:
	print('YES')
elif 1 in l:
	print('YES')
elif 2 in l and l.count(2) >= 2:
	print('YES')
elif 2 in l and 4 in l and (l.count(4) == 2):
	print('YES')
else:
	print('NO')


k = list(map(int, input().split()))
k.sort()

def solve():
	if k[0] == 1:
		return True
	elif k[0] == 2:
		if k[1] == 2:
			return True
		elif k[1] == 4 and k[2] == 4:
			return True
	elif k[0] == 3 and k[1] == 3 and (k[2] == 3):
		return True
	return False
if solve():
	print('YES')
else:
	print('NO')


k = sorted(map(int, input().split()))
print('YES' if k[0] == 1 or (k[0] == 2 and (k[1] == 2 or (k[1] == 4 and k[2] == 4))) or (k[0] == 3 and k[2] == 3) else 'NO')


k = [int(i) for i in input().split()]
k.sort()
if k[0] <= 1 or k[1] <= 2 or k == [3, 3, 3] or (k == [2, 4, 4]):
	print('YES')
else:
	print('NO')


import sys
a = list(map(int, input().split()))
if a.count(1) or a.count(2) > 1 or (a.count(2) == 1 and a.count(4) == 2) or (a.count(3) == 3):
	print('YES')
else:
	print('NO')


l = list(sorted(list(map(int, input().split()))))
if min(l) == 1 or (l[0] == 3 and l[1] == 3 and (l[2] == 3)) or (l[0] == 2 and l[1] == 4 and (l[2] == 4)) or (l[0] == 2 and l[1] == 2):
	print('Yes')
else:
	print('No')


(k1, k2, k3) = [int(i) for i in input().split()]
if min(k1, k2, k3) == 1:
	print('YES')
	exit(0)
if [k1, k2, k3].count(2) >= 2:
	print('YES')
	exit(0)
if [k1, k2, k3].count(3) >= 3:
	print('YES')
	exit(0)
if [k1, k2, k3].count(4) == 2 and min(k1, k2, k3) == 2:
	print('YES')
	exit(0)
print('NO')


a = list(map(int, input().split()))
s = [[3, 3, 3], [2, 4, 4], [4, 2, 4], [4, 4, 2]]
two = 0
for item in a:
	if item == 2:
		two += 1
if 1 in a or a in s or two > 1:
	print('YES')
else:
	print('NO')


from collections import Counter

def main():
	c = Counter(map(int, input().split()))
	if c[1] >= 1 or c[2] >= 2 or c[3] >= 3 or (c[4] == 2 and c[2] == 1):
		print('YES')
	else:
		print('NO')
main()


a = list(map(int, input().split()))
if a.count(2) >= 2 or a.count(3) == 3 or set(a) == {2, 4} or (1 in a):
	print('YES')
else:
	print('NO')


import sys
nums = list(map(int, input().split(' ')))
if 1 in nums:
	print('YES')
	sys.exit()
if nums.count(2) >= 2 or (nums.count(2) == 1 and nums.count(4) == 2):
	print('YES')
	sys.exit()
if nums.count(3) == 3:
	print('YES')
	sys.exit()
print('NO')


(a, b, c) = map(int, input().split())
m = min(a, b, c)
if m > 3:
	print('NO')
elif m == 3:
	if [a, b, c].count(3) == 3:
		print('YES')
	else:
		print('NO')
elif m == 2:
	if [a, b, c].count(2) > 1 or [a, b, c].count(4) > 1:
		print('YES')
	else:
		print('NO')
elif m == 1:
	print('YES')


s = list(map(int, input().split()))
k1 = s[0]
k2 = s[1]
k3 = s[2]
will = False
ks = [k1, k2, k3]
if 1 in ks:
	will = True
if ks.count(2) > 1:
	will = True
if set(ks) == {3}:
	will = True
if set(ks) == {2, 4}:
	will = True
if will:
	print('YES')
else:
	print('NO')


import math
inp = input().split(' ')
k1 = int(inp[0])
k2 = int(inp[1])
k3 = int(inp[2])
if k1 == 1 or k2 == 1 or k3 == 1:
	print('YES')
elif k1 == 2 and k2 == 2 or (k2 == 2 and k3 == 2) or (k1 == 2 and k3 == 2):
	print('YES')
elif k1 == 3 and k2 == 3 and (k3 == 3):
	print('YES')
elif k1 == 2 and k2 == 4 and (k3 == 4) or (k1 == 4 and k2 == 2 and (k3 == 4)) or (k1 == 4 and k2 == 4 and (k3 == 2)):
	print('YES')
else:
	print('NO')


arr = [int(item) for item in input().split()]
count2 = 0
count4 = 0
count = 0
count3 = 0
for j in arr:
	if j == 2:
		count2 = count2 + 1
	if j == 4:
		count4 = count4 + 1
	if j == 1:
		count = 1
	if j == 3:
		count3 = count3 + 1
if count3 == 3:
	print('YES')
	exit()
if count == 1:
	print('YES')
	exit()
if count2 >= 2:
	print('YES')
	exit()
elif count2 == 1 and count4 == 2:
	print('YES')
	exit()
else:
	print('NO')


(a, b, c) = map(int, input().split())
if 1 in [a, b, c] or max([a, b, c]) <= 2 or [a, b, c].count(2) >= 2 or (sorted([a, b, c]) == [2, 4, 4]) or ([a, b, c].count(3) == 3):
	print('YES')
else:
	print('NO')


def arr_inp():
	return [int(x) for x in stdin.readline().split()]
from sys import stdin
k = arr_inp()
print('YES' if k.count(2) >= 2 or k.count(3) == 3 or k.count(1) >= 1 or (k.count(2) == 1 and k.count(4) == 2) else 'NO')


(k1, k2, k3) = map(int, input().split())
if k2 >= k1 and k2 >= k3:
	(k1, k2, k3) = (k2, k1, k3)
elif k3 >= k1 and k3 >= k2:
	(k1, k2, k3) = (k3, k1, k2)

def get(k1, k2, k3):
	MAX = 15000
	L = [0] * MAX
	for i in range(MAX):
		if i * k1 >= MAX:
			break
		L[i * k1] = 1
	z = MAX - 1
	for i in range(MAX):
		if L[i] == 0:
			z = i
			break
	for i in range(MAX):
		if z + i * k2 >= MAX:
			break
		L[z + i * k2] = 2
	z = MAX - 1
	for i in range(MAX):
		if L[i] == 0:
			z = i
			break
	for i in range(MAX):
		if z + i * k3 >= MAX:
			break
		L[z + i * k3] = 3
	z = MAX - 1
	for i in range(MAX):
		if L[i] == 0:
			z = i
			break
	if z < MAX - 1:
		return 0
	else:
		return 1
RES1 = get(k1, k2, k3)
RES2 = get(k1, k3, k2)
if RES1 or RES2:
	print('YES')
else:
	print('NO')


(a, b, c) = [int(x) for x in input().split()]
if a == 1 or b == 1 or c == 1:
	print('YES')
else:
	hsh = [0] * 100000
	n = 100000
	(a, b, c) = sorted([a, b, c])
	for i in range(1, n, a):
		hsh[i] = 1
	for i in range(2, n, b):
		hsh[i] = 1
	if 0 not in hsh[1:]:
		print('YES')
	else:
		idx = hsh.index(0, 1)
		for i in range(idx, n, c):
			hsh[i] = 1
		if 0 in hsh[1:]:
			print('NO')
		else:
			print('YES')


a = [int(x) for x in input().split()]
if 1 in a:
	print('YES')
elif a.count(2) >= 2:
	print('YES')
elif a.count(3) == 3:
	print('YES')
elif set(a) == {2, 4, 4}:
	print('YES')
else:
	print('NO')


(k1, k2, k3) = sorted(map(int, input().split()))
if k1 == 1 or (k1, k2) == (2, 2) or (k1, k2, k3) in [(3, 3, 3), (2, 4, 4)]:
	print('YES')
else:
	print('NO')


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 ** 15
mod = 10 ** 9 + 7

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 = LI()
	d = collections.Counter(a)
	if d[1] >= 1:
		return 'YES'
	if d[2] >= 2:
		return 'YES'
	if d[3] >= 3:
		return 'YES'
	if d[2] >= 1 and d[4] >= 2:
		return 'YES'
	return 'NO'
print(main())


l = list(map(int, input().split()))
if l.count(1) >= 1 or l.count(2) >= 2 or l.count(3) == 3 or (l == [4, 4, 2]) or (l == [2, 4, 4]) or (l == [4, 2, 4]):
	print('YES')
else:
	print('NO')


from collections import defaultdict
(x, y, z) = [int(a) for a in input().strip().split()]
d = defaultdict(int)
d[x] += 1
d[y] += 1
d[z] += 1
print('YES' if d[1] > 0 or d[2] > 1 or d[3] > 2 or (d[4] == 2 and d[2] == 1) else 'NO')


ks = [int(v) for v in input().split()]
ks.sort()

def solve(ks):
	(k1, k2, k3) = ks
	if k1 == 1:
		return True
	elif k1 == 2:
		if k2 == 2:
			return True
		elif k2 == 4 and k3 == 4:
			return True
		else:
			return False
	elif k1 == 3:
		if k2 == 3 and k3 == 3:
			return True
		else:
			return False
	else:
		return False
print(['NO', 'YES'][solve(ks)])


a = [int(i) for i in input().split()]
a.sort()
if a[0] == 1:
	print('YES')
elif a[0] == 2 and a[1] == 2:
	print('YES')
elif a[0] == 2 and a[1] == 4 and (a[2] == 4):
	print('YES')
elif a[0] == 3 and a[1] == 3 and (a[2] == 3):
	print('YES')
else:
	print('NO')


import sys, math
(a, b, c) = map(int, sys.stdin.readline().split())
l = [a, b, c]
if l.count(1) > 0:
	print('YES')
elif l.count(2) > 1:
	print('YES')
elif l.count(3) == 3:
	print('YES')
elif l.count(2) == 1 and l.count(4) == 2:
	print('YES')
else:
	print('NO')


(k1, k2, k3) = map(int, input().split())
l = [k1, k2, k3]
if 1 in l:
	print('YES')
	exit()
if l.count(2) >= 2:
	print('YES')
	exit()
if l.count(3) >= 3:
	print('YES')
	exit()
if sorted(l) == [2, 4, 4]:
	print('YES')
	exit()
print('NO')


k = tuple(sorted(map(int, input().split())))
if 1 in k or k.count(2) > 1 or k.count(3) == 3 or (k == (2, 4, 4)):
	print('YES')
else:
	print('NO')


from collections import Counter
data = list(map(int, input().split()))
c = Counter(data)
if 1 in c or (2 in c and c[2] > 1) or (3 in c and c[3] > 2) or (2 in c and 4 in c and (c[4] > 1)):
	print('YES')
else:
	print('NO')


l = [int(x) for x in input().split()]
if 1 in l or l.count(2) >= 2 or l.count(3) == 3 or (sorted(l) == [2, 4, 4]):
	print('YES')
else:
	print('NO')


from math import *
from bisect import *
from collections import Counter, defaultdict, deque
from sys import stdin, stdout
input = stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))

def check(d, e, f):
	a = [0] * 20
	for i in range(0, 20, d):
		a[i] = 1
	if 0 in a:
		for i in range(a.index(0), 20, e):
			a[i] = 1
	if 0 in a:
		for i in range(a.index(0), 20, f):
			a[i] = 1
	if sum(a) == 20:
		return True
	return False
for _ in range(1):
	(a, b, c) = sorted(M())
	if check(a, b, c):
		print('YES')
	elif check(a, c, b):
		print('YES')
	elif check(b, a, c):
		print('YES')
	elif check(c, a, b):
		print('YES')
	elif check(b, c, a):
		print('YES')
	elif check(c, b, a):
		print('YES')
	else:
		print('NO')


(a, b, c) = map(int, input().split())
if a == 1 or b == 1 or c == 1 or (a == b == 2) or (b == c == 2) or (c == a == 2) or (a == b == c == 3):
	print('Yes')
elif a == 2 and b == c == 4 or (b == 2 and a == c == 4) or (c == 2 and b == a == 4):
	print('Yes')
else:
	print('No')


(a, b, c) = map(int, input().split())
d = min(a, b, c)
e = max(a, b, c)
f = a + b + c - d - e
if d == 1:
	print('YES')
elif d > 3:
	print('NO')
elif d == 2:
	if f == 2:
		print('YES')
	elif f == 4 and e == 4:
		print('YES')
	else:
		print('NO')
elif d == 3:
	if f == 3 and e == 3:
		print('YES')
	else:
		print('NO')


def main():
	(a, b, c) = map(int, input().split(' '))
	if a == 1 or b == 1 or c == 1:
		print('YES')
	elif a == 2 and b == 2 or (a == 2 and c == 2) or (c == 2 and b == 2):
		print('YES')
	elif a == 3 and b == 3 and (c == 3):
		print('YES')
	elif a == 4 and b == 4 and (c == 2) or (a == 4 and c == 4 and (b == 2)) or (c == 4 and b == 4 and (a == 2)):
		print('YES')
	else:
		print('NO')
main()


K = list(map(int, input().split()))
K.sort()

def solve():
	m = min(K)
	if m == 1:
		print('YES')
		return
	elif m >= 3:
		if K == [3, 3, 3]:
			print('YES')
			return
		else:
			print('NO')
			return
	elif K[1] == 2:
		print('YES')
		return
	elif K == [2, 4, 4]:
		print('YES')
		return
	else:
		print('NO')
		return
solve()


l = [int(x) for x in input().split()]
l.sort()
if l[0] == 1 or (l[1] == 2 and l[0] == 2) or (l[1] == l[2] and l[0] == l[1] and (l[2] == 3)) or (l == [2, 4, 4]):
	print('YES')
else:
	print('NO')


(k1, k2, k3) = input().strip().split()
(k1, k2, k3) = (int(k1), int(k2), int(k3))
answer = 'NO'
intervals = [k1, k2, k3]
if intervals.count(1) >= 1:
	answer = 'YES'
elif intervals.count(2) == 1:
	if intervals.count(4) == 2:
		answer = 'YES'
elif intervals.count(2) >= 2:
	answer = 'YES'
elif intervals.count(3) == 3:
	answer = 'YES'
print(answer)


import sys, math, queue, bisect
MOD = 10 ** 9 + 7
sys.setrecursionlimit(1000000)

def check(d, e):
	x = [False for i in range(2 * c)]
	x[0] = x[c] = True
	i = 0
	while i < 2 * c and x[i]:
		i += 1
	while i < 2 * c:
		x[i] = True
		i += d
	i = 0
	while i < 2 * c and x[i]:
		i += 1
	while i < 2 * c:
		x[i] = True
		i += e
	if all(x):
		return True
	return False
(a, b, c) = sorted(map(int, input().split()))
if check(a, b) or check(b, a):
	print('YES')
	exit()
print('NO')


def divisors(M):
	d = []
	i = 1
	while M >= i ** 2:
		if M % i == 0:
			d.append(i)
			if i ** 2 != M:
				d.append(M // i)
		i = i + 1
	return d

def popcount(x):
	x = x - (x >> 1 & 1431655765)
	x = (x & 858993459) + (x >> 2 & 858993459)
	x = x + (x >> 4) & 252645135
	x = x + (x >> 8)
	x = x + (x >> 16)
	return x & 127

def eratosthenes(n):
	res = [0 for i in range(n + 1)]
	prime = set([])
	for i in range(2, n + 1):
		if not res[i]:
			prime.add(i)
			for j in range(1, n // i + 1):
				res[i * j] = 1
	return prime

def factorization(n):
	res = []
	for p in prime:
		if n % p == 0:
			while n % p == 0:
				n //= p
			res.append(p)
	if n != 1:
		res.append(n)
	return res

def euler_phi(n):
	res = n
	for x in range(2, n + 1):
		if x ** 2 > n:
			break
		if n % x == 0:
			res = res // x * (x - 1)
			while n % x == 0:
				n //= x
	if n != 1:
		res = res // n * (n - 1)
	return res

def ind(b, n):
	res = 0
	while n % b == 0:
		res += 1
		n //= b
	return res

def isPrimeMR(n):
	d = n - 1
	d = d // (d & -d)
	L = [2, 3, 5, 7, 11, 13, 17]
	for a in L:
		t = d
		y = pow(a, t, n)
		if y == 1:
			continue
		while y != n - 1:
			y = y * y % n
			if y == 1 or t == n - 1:
				return 0
			t <<= 1
	return 1

def findFactorRho(n):
	from math import gcd
	m = 1 << n.bit_length() // 8
	for c in range(1, 99):
		f = lambda x: (x * x + c) % n
		(y, r, q, g) = (2, 1, 1, 1)
		while g == 1:
			x = y
			for i in range(r):
				y = f(y)
			k = 0
			while k < r and g == 1:
				ys = y
				for i in range(min(m, r - k)):
					y = f(y)
					q = q * abs(x - y) % n
				g = gcd(q, n)
				k += m
			r <<= 1
		if g == n:
			g = 1
			while g == 1:
				ys = f(ys)
				g = gcd(abs(x - ys), n)
		if g < n:
			if isPrimeMR(g):
				return g
			elif isPrimeMR(n // g):
				return n // g
			return findFactorRho(g)

def primeFactor(n):
	i = 2
	ret = {}
	rhoFlg = 0
	while i * i <= n:
		k = 0
		while n % i == 0:
			n //= i
			k += 1
		if k:
			ret[i] = k
		i += 1 + i % 2
		if i == 101 and n >= 2 ** 20:
			while n > 1:
				if isPrimeMR(n):
					(ret[n], n) = (1, 1)
				else:
					rhoFlg = 1
					j = findFactorRho(n)
					k = 0
					while n % j == 0:
						n //= j
						k += 1
					ret[j] = k
	if n > 1:
		ret[n] = 1
	if rhoFlg:
		ret = {x: ret[x] for x in sorted(ret)}
	return ret

def divisors(n):
	res = [1]
	prime = primeFactor(n)
	for p in prime:
		newres = []
		for d in res:
			for j in range(prime[p] + 1):
				newres.append(d * p ** j)
		res = newres
	res.sort()
	return res

def xorfactorial(num):
	if num == 0:
		return 0
	elif num == 1:
		return 1
	elif num == 2:
		return 3
	elif num == 3:
		return 0
	else:
		x = baseorder(num)
		return 2 ** x * ((num - 2 ** x + 1) % 2) + function(num - 2 ** x)

def xorconv(n, X, Y):
	if n == 0:
		res = [X[0] * Y[0] % mod]
		return res
	x = [X[i] + X[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	y = [Y[i] + Y[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	z = [X[i] - X[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	w = [Y[i] - Y[i + 2 ** (n - 1)] for i in range(2 ** (n - 1))]
	res1 = xorconv(n - 1, x, y)
	res2 = xorconv(n - 1, z, w)
	former = [(res1[i] + res2[i]) * inv for i in range(2 ** (n - 1))]
	latter = [(res1[i] - res2[i]) * inv for i in range(2 ** (n - 1))]
	former = list(map(lambda x: x % mod, former))
	latter = list(map(lambda x: x % mod, latter))
	return former + latter

def merge_sort(A, B):
	(pos_A, pos_B) = (0, 0)
	(n, m) = (len(A), len(B))
	res = []
	while pos_A < n and pos_B < m:
		(a, b) = (A[pos_A], B[pos_B])
		if a < b:
			res.append(a)
			pos_A += 1
		else:
			res.append(b)
			pos_B += 1
	res += A[pos_A:]
	res += B[pos_B:]
	return res

class UnionFindVerSize:

	def __init__(self, N):
		self._parent = [n for n in range(0, N)]
		self._size = [1] * N
		self.group = N

	def find_root(self, x):
		if self._parent[x] == x:
			return x
		self._parent[x] = self.find_root(self._parent[x])
		stack = [x]
		while self._parent[stack[-1]] != stack[-1]:
			stack.append(self._parent[stack[-1]])
		for v in stack:
			self._parent[v] = stack[-1]
		return self._parent[x]

	def unite(self, x, y):
		gx = self.find_root(x)
		gy = self.find_root(y)
		if gx == gy:
			return
		self.group -= 1
		if self._size[gx] < self._size[gy]:
			self._parent[gx] = gy
			self._size[gy] += self._size[gx]
		else:
			self._parent[gy] = gx
			self._size[gx] += self._size[gy]

	def get_size(self, x):
		return self._size[self.find_root(x)]

	def is_same_group(self, x, y):
		return self.find_root(x) == self.find_root(y)

class WeightedUnionFind:

	def __init__(self, N):
		self.parent = [i for i in range(N)]
		self.size = [1 for i in range(N)]
		self.val = [0 for i in range(N)]
		self.flag = True
		self.edge = [[] for i in range(N)]

	def dfs(self, v, pv):
		stack = [(v, pv)]
		new_parent = self.parent[pv]
		while stack:
			(v, pv) = stack.pop()
			self.parent[v] = new_parent
			for (nv, w) in self.edge[v]:
				if nv != pv:
					self.val[nv] = self.val[v] + w
					stack.append((nv, v))

	def unite(self, x, y, w):
		if not self.flag:
			return
		if self.parent[x] == self.parent[y]:
			self.flag = self.val[x] - self.val[y] == w
			return
		if self.size[self.parent[x]] > self.size[self.parent[y]]:
			self.edge[x].append((y, -w))
			self.edge[y].append((x, w))
			self.size[x] += self.size[y]
			self.val[y] = self.val[x] - w
			self.dfs(y, x)
		else:
			self.edge[x].append((y, -w))
			self.edge[y].append((x, w))
			self.size[y] += self.size[x]
			self.val[x] = self.val[y] + w
			self.dfs(x, y)

class Dijkstra:

	class Edge:

		def __init__(self, _to, _cost):
			self.to = _to
			self.cost = _cost

	def __init__(self, V):
		self.G = [[] for i in range(V)]
		self._E = 0
		self._V = V

	@property
	def E(self):
		return self._E

	@property
	def V(self):
		return self._V

	def add_edge(self, _from, _to, _cost):
		self.G[_from].append(self.Edge(_to, _cost))
		self._E += 1

	def shortest_path(self, s):
		import heapq
		que = []
		d = [10 ** 15] * self.V
		d[s] = 0
		heapq.heappush(que, (0, s))
		while len(que) != 0:
			(cost, v) = heapq.heappop(que)
			if d[v] < cost:
				continue
			for i in range(len(self.G[v])):
				e = self.G[v][i]
				if d[e.to] > d[v] + e.cost:
					d[e.to] = d[v] + e.cost
					heapq.heappush(que, (d[e.to], e.to))
		return d

def Z_algorithm(s):
	N = len(s)
	Z_alg = [0] * N
	Z_alg[0] = N
	i = 1
	j = 0
	while i < N:
		while i + j < N and s[j] == s[i + j]:
			j += 1
		Z_alg[i] = j
		if j == 0:
			i += 1
			continue
		k = 1
		while i + k < N and k + Z_alg[k] < j:
			Z_alg[i + k] = Z_alg[k]
			k += 1
		i += k
		j -= k
	return Z_alg

class BIT:

	def __init__(self, n, mod=None):
		self.BIT = [0] * (n + 1)
		self.num = n
		self.mod = mod

	def query(self, idx):
		res_sum = 0
		mod = self.mod
		while idx > 0:
			res_sum += self.BIT[idx]
			if mod:
				res_sum %= mod
			idx -= idx & -idx
		return res_sum

	def update(self, idx, x):
		self.mod = mod
		while idx <= self.num:
			self.BIT[idx] += x
			if mod:
				self.BIT[idx] %= mod
			idx += idx & -idx
		return

class dancinglink:

	def __init__(self, n, debug=False):
		self.n = n
		self.debug = debug
		self._left = [i - 1 for i in range(n)]
		self._right = [i + 1 for i in range(n)]
		self.exist = [True for i in range(n)]

	def pop(self, k):
		if self.debug:
			assert self.exist[k]
		L = self._left[k]
		R = self._right[k]
		if L != -1:
			if R != self.n:
				(self._right[L], self._left[R]) = (R, L)
			else:
				self._right[L] = self.n
		elif R != self.n:
			self._left[R] = -1
		self.exist[k] = False

	def left(self, idx, k=1):
		if self.debug:
			assert self.exist[idx]
		res = idx
		while k:
			res = self._left[res]
			if res == -1:
				break
			k -= 1
		return res

	def right(self, idx, k=1):
		if self.debug:
			assert self.exist[idx]
		res = idx
		while k:
			res = self._right[res]
			if res == self.n:
				break
			k -= 1
		return res

class SparseTable:

	def __init__(self, A, merge_func, ide_ele):
		N = len(A)
		n = N.bit_length()
		self.table = [[ide_ele for i in range(n)] for i in range(N)]
		self.merge_func = merge_func
		for i in range(N):
			self.table[i][0] = A[i]
		for j in range(1, n):
			for i in range(0, N - 2 ** j + 1):
				f = self.table[i][j - 1]
				s = self.table[i + 2 ** (j - 1)][j - 1]
				self.table[i][j] = self.merge_func(f, s)

	def query(self, s, t):
		b = t - s + 1
		m = b.bit_length() - 1
		return self.merge_func(self.table[s][m], self.table[t - 2 ** m + 1][m])

class BinaryTrie:

	class node:

		def __init__(self, val):
			self.left = None
			self.right = None
			self.max = val

	def __init__(self):
		self.root = self.node(-10 ** 15)

	def append(self, key, val):
		pos = self.root
		for i in range(29, -1, -1):
			pos.max = max(pos.max, val)
			if key >> i & 1:
				if pos.right is None:
					pos.right = self.node(val)
					pos = pos.right
				else:
					pos = pos.right
			elif pos.left is None:
				pos.left = self.node(val)
				pos = pos.left
			else:
				pos = pos.left
		pos.max = max(pos.max, val)

	def search(self, M, xor):
		res = -10 ** 15
		pos = self.root
		for i in range(29, -1, -1):
			if pos is None:
				break
			if M >> i & 1:
				if xor >> i & 1:
					if pos.right:
						res = max(res, pos.right.max)
					pos = pos.left
				else:
					if pos.left:
						res = max(res, pos.left.max)
					pos = pos.right
			elif xor >> i & 1:
				pos = pos.right
			else:
				pos = pos.left
		if pos:
			res = max(res, pos.max)
		return res

def solveequation(edge, ans, n, m):
	x = [0] * m
	used = [False] * n
	for v in range(n):
		if used[v]:
			continue
		y = dfs(v)
		if y != 0:
			return False
	return x

	def dfs(v):
		used[v] = True
		r = ans[v]
		for (to, dire, id) in edge[v]:
			if used[to]:
				continue
			y = dfs(to)
			if dire == -1:
				x[id] = y
			else:
				x[id] = -y
			r += y
		return r

class Matrix:
	mod = 10 ** 9 + 7

	def set_mod(m):
		Matrix.mod = m

	def __init__(self, L):
		self.row = len(L)
		self.column = len(L[0])
		self._matrix = L
		for i in range(self.row):
			for j in range(self.column):
				self._matrix[i][j] %= Matrix.mod

	def __getitem__(self, item):
		if type(item) == int:
			raise IndexError('you must specific row and column')
		elif len(item) != 2:
			raise IndexError('you must specific row and column')
		(i, j) = item
		return self._matrix[i][j]

	def __setitem__(self, item, val):
		if type(item) == int:
			raise IndexError('you must specific row and column')
		elif len(item) != 2:
			raise IndexError('you must specific row and column')
		(i, j) = item
		self._matrix[i][j] = val

	def __add__(self, other):
		if (self.row, self.column) != (other.row, other.column):
			raise SizeError('sizes of matrixes are different')
		res = [[0 for j in range(self.column)] for i in range(self.row)]
		for i in range(self.row):
			for j in range(self.column):
				res[i][j] = self._matrix[i][j] + other._matrix[i][j]
				res[i][j] %= Matrix.mod
		return Matrix(res)

	def __sub__(self, other):
		if (self.row, self.column) != (other.row, other.column):
			raise SizeError('sizes of matrixes are different')
		res = [[0 for j in range(self.column)] for i in range(self.row)]
		for i in range(self.row):
			for j in range(self.column):
				res[i][j] = self._matrix[i][j] - other._matrix[i][j]
				res[i][j] %= Matrix.mod
		return Matrix(res)

	def __mul__(self, other):
		if type(other) != int:
			if self.column != other.row:
				raise SizeError('sizes of matrixes are different')
			res = [[0 for j in range(other.column)] for i in range(self.row)]
			for i in range(self.row):
				for j in range(other.column):
					temp = 0
					for k in range(self.column):
						temp += self._matrix[i][k] * other._matrix[k][j]
					res[i][j] = temp % Matrix.mod
			return Matrix(res)
		else:
			n = other
			res = [[n * self._matrix[i][j] % Matrix.mod for j in range(self.column)] for i in range(self.row)]
			return Matrix(res)

	def __pow__(self, m):
		if self.column != self.row:
			raise MatrixPowError('the size of row must be the same as that of column')
		n = self.row
		res = Matrix([[int(i == j) for i in range(n)] for j in range(n)])
		while m:
			if m % 2 == 1:
				res = res * self
			self = self * self
			m //= 2
		return res

	def __str__(self):
		res = []
		for i in range(self.row):
			for j in range(self.column):
				res.append(str(self._matrix[i][j]))
				res.append(' ')
			res.append('\n')
		res = res[:len(res) - 1]
		return ''.join(res)

class SegmentTree:

	def __init__(self, init_val, segfunc, ide_ele):
		n = len(init_val)
		self.segfunc = segfunc
		self.ide_ele = ide_ele
		self.num = 1 << (n - 1).bit_length()
		self.tree = [ide_ele] * 2 * self.num
		for i in range(n):
			self.tree[self.num + i] = init_val[i]
		for i in range(self.num - 1, 0, -1):
			self.tree[i] = self.segfunc(self.tree[2 * i], self.tree[2 * i + 1])

	def update(self, k, x):
		k += self.num
		self.tree[k] = x
		while k > 1:
			self.tree[k >> 1] = self.segfunc(self.tree[k], self.tree[k ^ 1])
			k >>= 1

	def query(self, l, r):
		res = self.ide_ele
		l += self.num
		r += self.num
		while l < r:
			if l & 1:
				res = self.segfunc(res, self.tree[l])
				l += 1
			if r & 1:
				res = self.segfunc(res, self.tree[r - 1])
			l >>= 1
			r >>= 1
		return res

	def bisect_l(self, l, r, x):
		l += self.num
		r += self.num
		Lmin = -1
		Rmin = -1
		while l < r:
			if l & 1:
				if self.tree[l] <= x and Lmin == -1:
					Lmin = l
				l += 1
			if r & 1:
				if self.tree[r - 1] <= x:
					Rmin = r - 1
			l >>= 1
			r >>= 1
		if Lmin != -1:
			pos = Lmin
			while pos < self.num:
				if self.tree[2 * pos] <= x:
					pos = 2 * pos
				else:
					pos = 2 * pos + 1
			return pos - self.num
		elif Rmin != -1:
			pos = Rmin
			while pos < self.num:
				if self.tree[2 * pos] <= x:
					pos = 2 * pos
				else:
					pos = 2 * pos + 1
			return pos - self.num
		else:
			return -1
from heapq import heappush, heappop

class MinCostFlow:
	INF = 10 ** 18

	def __init__(self, N):
		self.N = N
		self.G = [[] for i in range(N)]

	def add_edge(self, fr, to, cap, cost):
		forward = [to, cap, cost, None]
		backward = forward[3] = [fr, 0, -cost, forward]
		self.G[fr].append(forward)
		self.G[to].append(backward)

	def flow(self, s, t, f):
		N = self.N
		G = self.G
		INF = MinCostFlow.INF
		res = 0
		H = [0] * N
		prv_v = [0] * N
		prv_e = [None] * N
		d0 = [INF] * N
		dist = [INF] * N
		while f:
			dist[:] = d0
			dist[s] = 0
			que = [(0, s)]
			while que:
				(c, v) = heappop(que)
				if dist[v] < c:
					continue
				r0 = dist[v] + H[v]
				for e in G[v]:
					(w, cap, cost, _) = e
					if cap > 0 and r0 + cost - H[w] < dist[w]:
						dist[w] = r = r0 + cost - H[w]
						prv_v[w] = v
						prv_e[w] = e
						heappush(que, (r, w))
			if dist[t] == INF:
				return None
			for i in range(N):
				H[i] += dist[i]
			d = f
			v = t
			while v != s:
				d = min(d, prv_e[v][1])
				v = prv_v[v]
			f -= d
			res += d * H[t]
			v = t
			while v != s:
				e = prv_e[v]
				e[1] -= d
				e[3][1] += d
				v = prv_v[v]
		return res
import sys, random, bisect
from collections import deque, defaultdict
from heapq import heapify, heappop, heappush
from itertools import permutations
from math import log, gcd
input = lambda : sys.stdin.buffer.readline()
mi = lambda : map(int, input().split())
li = lambda : list(mi())
k = li()
k.sort()
k = tuple(k)
ans = [(2, 4, 4), (3, 3, 3)]
if k.count(1) >= 1:
	print('YES')
elif k.count(2) >= 2:
	print('YES')
elif k.count(3) >= 3:
	print('YES')
elif k in ans:
	print('YES')
else:
	print('NO')


(k1, k2, k3) = map(int, input().split())
fl = 0
for i1 in range(5):
	for i2 in range(5):
		for i3 in range(5):
			flak = 1
			for i in range(8):
				if (i - i1) % k1 == 0 or (i - i2) % k2 == 0 or (i - i3) % k3 == 0:
					continue
				else:
					flak = 0
			if flak == 1:
				fl = 1
if fl == 1:
	print('YES')
else:
	print('NO')


import os
import sys
from io import BytesIO, IOBase
import math
from queue import Queue
import collections
import itertools
import bisect
import heapq
import random

def main():
	pass
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 binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

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

def primeFactorsCount(n):
	cnt = 0
	while n % 2 == 0:
		cnt += 1
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			cnt += 1
			n = n // i
	if n > 2:
		cnt += 1
	return cnt

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)

def countcon(s, i):
	c = 0
	ch = s[i]
	for i in range(i, len(s)):
		if s[i] == ch:
			c += 1
		else:
			break
	return c

def lis(arr):
	n = len(arr)
	lis = [1] * n
	for i in range(1, n):
		for j in range(0, i):
			if arr[i] > arr[j] and lis[i] < lis[j] + 1:
				lis[i] = lis[j] + 1
	maximum = 0
	for i in range(n):
		maximum = max(maximum, lis[i])
	return maximum

def isSubSequence(str1, str2):
	m = len(str1)
	n = len(str2)
	j = 0
	i = 0
	while j < m and i < n:
		if str1[j] == str2[i]:
			j = j + 1
		i = i + 1
	return j == m

def maxfac(n):
	root = int(n ** 0.5)
	for i in range(2, root + 1):
		if n % i == 0:
			return n // i
	return n

def p2(n):
	c = 0
	while n % 2 == 0:
		n //= 2
		c += 1
	return c

def seive(n):
	primes = [True] * (n + 1)
	primes[1] = primes[0] = False
	i = 2
	while i * i <= n:
		if primes[i] == True:
			for j in range(i * i, n + 1, i):
				primes[j] = False
		i += 1
	pr = []
	for i in range(0, n + 1):
		if primes[i]:
			pr.append(i)
	return pr

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def denofactinverse(n, m):
	fac = 1
	for i in range(1, n + 1):
		fac = fac * i % m
	return pow(fac, m - 2, m)

def numofact(n, m):
	fac = 1
	for i in range(1, n + 1):
		fac = fac * i % m
	return fac

def sod(n):
	s = 0
	while n > 0:
		s += n % 10
		n //= 10
	return s
(a, b, c) = map(int, input().split())
l = sorted([a, b, c])
if l == [2, 2, 2] or l == [2, 2, 3] or l == [3, 3, 3] or (l == [2, 4, 4]):
	print('YES')
elif l[0] == l[1] == 2 or l[0] == 1:
	print('YES')
else:
	print('NO')


import os
import sys
from io import BytesIO, IOBase
import math
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')
l = list(map(int, input().split()))
l.sort()
if 1 in l:
	print('YES')
elif l[0] == 2 and l[1] == 2:
	print('YES')
elif l[0] == 3 and l[1] == 3 and (l[2] == 3):
	print('YES')
elif l[0] == 2 and l[1] == 4 and (l[2] == 4):
	print('YES')
else:
	print('NO')


k = [int(x) for x in input().split()]
ans = 1
if k.count(2) >= 2 or (k.count(2) == 1 and k.count(4) == 2) or k.count(1) > 0 or (k.count(3) == 3):
	ans -= 1
print('YNEOS'[ans::2])


(k1, k2, k3) = map(int, input().split())
a = [0 for i in range(1600)]
a[k1] += 1
a[k2] += 1
a[k3] += 1
if a[1] >= 1:
	print('YES')
elif a[2] >= 2:
	print('YES')
elif a[3] >= 3:
	print('YES')
elif a[2] == 1 and a[4] == 2:
	print('YES')
else:
	print('NO')


def possible(vals):
	if 1 in vals:
		return True
	if vals.count(2) >= 2:
		return True
	if vals.count(3) == 3:
		return True
	if vals.count(2) == 1 and vals.count(4) == 2:
		return True
	return False
vals = list(map(int, input().split()))
if possible(vals):
	print('YES')
else:
	print('NO')


(k1, k2, k3) = map(int, input().split())
if min(k1, k2, k3) == 1:
	print('YES')
else:
	ma = max(k1, k2, k3)
	mi = min(k1, k2, k3)
	s = k1 + k2 + k3 - ma - mi
	h = [0] * ma * 2
	h[0] = 1
	h[ma] = 1
	for i in range(1, ma * 2, mi):
		h[i] = 1
	for i in range(2, ma * 2, s):
		h[i] = 1
	if 0 not in h:
		print('YES')
	else:
		print('NO')


k = [int(a) for a in input().strip().split()]
times = dict()
for i in range(3):
	if k[i] not in times:
		times[k[i]] = 1
	else:
		times[k[i]] += 1
flag = 0
if 1 in times:
	flag = 1
elif 2 in times and times[2] >= 2:
	flag = 1
elif 3 in times and times[3] >= 3:
	flag = 1
elif 4 in times and 2 in times and (times[4] == 2) and (times[2] == 1):
	flag = 1
if flag:
	print('YES')
else:
	print('NO')


k = [int(x) for x in input().split()]
k.sort()
if k[0] == 1:
	print('YES')
elif k[0] == 2 and k[1] == 2:
	print('YES')
elif k[0] == 3 and k[1] == 3 and (k[2] == 3):
	print('YES')
elif k[0] == 2 and k[1] == 4 and (k[2] == 4):
	print('YES')
else:
	print('NO')


x = list(map(int, input().split()))
x.sort()
if 1 in x or x.count(2) >= 2 or x == [3, 3, 3] or (x == [2, 4, 4]):
	print('YES')
else:
	print('NO')


def nachalo(a):
	for i in range(1, len(a)):
		if a[i] == 0:
			return i
	return 2000
a = list(map(int, input().split()))
a.sort()
min1 = a[0]
second = a[1]
max1 = a[2]
was = [0] * 2001
b = 1
while b < 2000:
	was[b] = 1
	b += min1
b = nachalo(was)
while b < 2000:
	was[b] = 1
	b += second
b = nachalo(was)
while b < 2000:
	was[b] = 1
	b += max1
Gar = True
for i in range(1, 2000):
	if was[i] == 0:
		Gar = False
		break
if Gar:
	print('Yes')
else:
	print('No')


s = input()
(k1, k2, k3) = s.split()
if k1 == '1' or k2 == '1' or k3 == '1':
	print('YES')
elif k1 == '2' and k3 == '2' or '2 2' in s:
	print('YES')
elif s == '3 3 3':
	print('YES')
elif s == '4 2 4' or s == '2 4 4' or s == '4 4 2':
	print('YES')
else:
	print('NO')


ks = list(map(int, input().split()))
(a, b, c, d) = (ks.count(1), ks.count(2), ks.count(3), ks.count(4))
if a > 0 or b > 1 or c > 2 or (b == 1 and d == 2):
	print('YES')
else:
	print('NO')


k = list(map(int, input().split()))
k.sort()
maks = 3 * max(k)
c = list()
c += '0' * maks
i = 0
count = 0
while count < 3:
	n = k[count]
	while i < maks:
		c[i] = '1'
		i += n
	i = 1
	while True:
		if i == maks:
			count = 4
			break
		elif c[i] == '0':
			count += 1
			break
		else:
			i += 1
if count == 3:
	print('NO')
else:
	print('YES')


import sys
import math

def IO():
	sys.stdin = open('pyinput.txt', 'r')
	sys.stdout = open('pyoutput.txt', 'w')

def GCD(a, b):
	if b == 0:
		return a
	else:
		return GCD(b, a % b)

def LCM(a, b):
	return a * (b // GCD(a, b))

def scan(TYPE_1, TYPE_2=0):
	if TYPE_1 == int:
		return map(int, sys.stdin.readline().strip().split())
	elif TYPE_1 == float:
		return map(float, sys.stdin.readline().strip().split())
	elif TYPE_1 == list and TYPE_2 == float:
		return list(map(float, sys.stdin.readline().strip().split()))
	elif TYPE_1 == list and TYPE_2 == int:
		return list(map(int, sys.stdin.readline().strip().split()))
	elif TYPE_1 == str:
		return sys.stdin.readline().strip()
	else:
		print('ERROR!!!!')

def main():
	a = scan(list, int)
	a.sort()
	mark = [0] * 1000
	for i in a:
		for j in range(1000):
			if mark[j] == 1:
				continue
			for k in range(j, 1000, i):
				mark[k] = 1
			break
	for i in mark:
		if i == 0:
			print('NO')
			return
	print('YES')
main()


a = list(map(int, input().split()))
if 1 in a:
	print('YES')
	quit()
twos = a.count(2)
threes = a.count(3)
fours = a.count(4)
if twos > 1 or threes == 3 or (twos == 1 and fours == 2):
	print('YES')
	quit()
print('NO')


k = list(map(int, input().strip().split()))
k = sorted(k)
if k[0] == 1:
	print('YES')
elif k[0] == 2 and k[1] == 2:
	print('YES')
elif k[0] == 2 and k[1] == 4 and (k[2] == 4):
	print('YES')
elif k[0] == 3 and k[1] == 3 and (k[2] == 3):
	print('YES')
else:
	print('NO')


import sys
nums = [x for x in map(int, input().split())]
nums = sorted(nums)
if nums[0] == 1:
	print('YES')
	sys.exit(0)
if nums[0] == 2:
	if nums[1] == 2 or (nums[1] == 4 and nums[2] == 4):
		print('YES')
		sys.exit(0)
	else:
		print('NO')
		sys.exit(0)
if nums[0] == 3 and nums[1] == 3 and (nums[2] == 3):
	print('YES')
	sys.exit(0)
print('NO')
sys.exit(0)


from sys import stdin, stdout

def GCD(a, b):
	if not b:
		return a
	else:
		return GCD(b, a % b)
(k1, k2, k3) = sorted(list(map(int, stdin.readline().split())))
x1 = 1
x2 = 2
if k1 <= 2:
	x3 = 4
else:
	x3 = 3
sze = 10 ** 7
for i in range(1, sze):
	label = 0
	if i >= x1 and (not (i - x1) % k1):
		label = 1
	elif i >= x2 and (not (i - x2) % k2):
		label = 1
	elif i >= x3 and (not (i - x3) % k3):
		label = 1
	else:
		stdout.write('NO')
		break
else:
	stdout.write('YES')


from math import gcd
import sys

def f():
	(a, b, c) = sorted(map(int, input().split()))
	x1 = 0
	for x2 in range(100):
		for x3 in range(100):
			ok = True
			for t in range(x3, x3 + 5000):
				if (t - x1) % a == 0 or (t - x2) % b == 0 or (t - x3) % c == 0:
					continue
				else:
					ok = False
					break
			if ok:
				print('YES')
				return
	print('NO')
f()


l = [int(i) for i in input().split(' ')]
l.sort()
(x, y, z) = l
if 1 in l:
	print('YES')
elif [l[0], l[1]] == [2, 2] or [l[1], l[2]] == [2, 2] or l == [3, 3, 3]:
	print('YES')
else:
	l = [0 for i in range(50)]
	for i in range(0, 50, x):
		l[i] = 1
	for i in range(1, 50, y):
		l[i] = 1
	c = l.index(0)
	for i in range(c, 50, z):
		l[i] = 1
	if 0 in l:
		print('NO')
	else:
		print('YES')


(k1, k2, k3) = map(int, input().split())
a = [k1, k2, k3]
a = sorted(a)
dp = [0] * 5001
dp[0] = 1
i = 0
while i <= 5000:
	if dp[i] == 0 and i + a[0] <= 5000:
		while i + a[0] <= 5000:
			dp[i] = 1
			i = i + a[0]
	else:
		i += 1
i = 0
while i <= 5000:
	if dp[i] == 0 and i + a[1] <= 5000:
		while i + a[1] <= 5000:
			dp[i] = 1
			i = i + a[1]
	else:
		i += 1
i = 0
while i <= 5000:
	if dp[i] == 0 and i + a[2] <= 5000:
		while i + a[2] <= 5000:
			dp[i] = 1
			i = i + a[2]
	else:
		i += 1
dp = dp[:2002]
if dp.count(0) == 0:
	print('YES')
else:
	print('NO')


def solve():
	k = [int(x) for x in input().split(' ')]
	k.sort()
	if min(k) == 1:
		return 'YES'
	elif k.count(2) >= 2:
		return 'YES'
	elif k.count(3) == 3:
		return 'YES'
	elif k == [2, 4, 4]:
		return 'YES'
	return 'NO'
print(solve())


(a, b, c) = map(int, input().split())
print(['NO', 'YES'][(a == 1 or b == 1 or c == 1) or (a == 2 and b == 2) or (a == 2 and c == 2) or (c == 2 and b == 2) or (a == 2 and b == 4 and (c == 4)) or (a == 4 and b == 2 and (c == 4)) or (a == 4 and b == 4 and (c == 2)) or (a == 3 and b == 3 and (c == 3))])


(k1, k2, k3) = map(int, input().split())
ans = 'NO'
if [k1, k2, k3].count(2) >= 2:
	ans = 'YES'
if 1 in [k1, k2, k3]:
	ans = 'YES'
if [k1, k2, k3].count(3) >= 3:
	ans = 'YES'
if 2 in [k1, k2, k3] and [k1, k2, k3].count(4) == 2:
	ans = 'YES'
print(ans)


l = [int(i) for i in input().split()]

def f(l):
	if 1 in l:
		return 'YES'
	if l.count(2) >= 2:
		return 'YES'
	if l.count(3) == 3:
		return 'YES'
	if l.count(2) == 1 and l.count(4) == 2:
		return 'YES'
	return 'NO'
print(f(l))


import bisect

def list_output(s):
	print(' '.join(map(str, s)))

def list_input(s='int'):
	if s == 'int':
		return list(map(int, input().split()))
	elif s == 'float':
		return list(map(float, input().split()))
	return list(map(str, input().split()))
(k1, k2, k3) = map(int, input().split())
seq = list([k1, k2, k3])
seq.sort()
if seq[0] == 1 or (seq[0] == 2 and seq[1] == 2) or (seq[0] == 2 and seq[1] == 4 and (seq[2] == 4)) or (seq[0] == 3 and seq[1] == 3 and (seq[2] == 3)):
	print('YES')
else:
	print('NO')


(k1, k2, k3) = map(int, input().split())
for (x1, x2, x3) in [(1, 2, 3), (2, 1, 3), (3, 1, 2), (1, 3, 2), (2, 3, 1), (3, 2, 1)]:
	a = [False] * 100

	def f(a, x, k):
		t = x
		while t < len(a):
			a[t] = True
			t += k
	f(a, x1, k1)
	f(a, x2, k2)
	f(a, x3, k3)
	if all(a[1:]):
		print('YES')
		break
else:
	print('NO')


arr = sorted(map(int, input().split()))
if arr[0] == 1:
	print('YES')
elif arr[0] == 2 and arr[1] == 2:
	print('YES')
elif arr[0] == 3 and arr[1] == 3 and (arr[2] == 3):
	print('YES')
elif arr[0] == 2 and arr[1] == 4 and (arr[2] == 4):
	print('YES')
else:
	print('No')


(k1, k2, k3) = map(int, input().strip().split(' '))
l = [k1, k2, k3]
if min(k1, k2, k3) == 1:
	print('yes')
elif l.count(2) >= 2:
	print('yes')
elif l.count(3) == 3:
	print('yes')
elif l.count(4) == 2 and l.count(2) == 1:
	print('yes')
else:
	print('no')


v = list(map(int, input().split()))
v.sort()
if v[0] == 1:
	print('YES')
	return
if v[0] == 2 and v[1] == 2:
	print('YES')
	return
if v.count(3) == 3:
	print('YES')
	return
if v[0] == 2 and v.count(4) == 2:
	print('YES')
	return
print('NO')


(a, b, c) = map(int, input().split())
v = [a, b, c]
v.sort()
if v[0] == 1 or (v[0] == 2 and v[1] == 2) or (v[0] == 2 and v[1] == 4 and (v[2] == 4)) or (v[0] == 3 and v[1] == 3 and (v[2] == 3)):
	print('YES')
else:
	print('NO')


(k1, k2, k3) = map(int, input().split())
a = [k1, k2, k3]
a = sorted(a)
if a[0] == 1 or a.count(2) >= 2 or a.count(3) == 3:
	print('YES')
elif a.count(4) == 2 and a.count(2) == 1:
	print('YES')
else:
	print('NO')


k = list(map(int, input().split()))
b = [[k[0], k[1], k[2]], [k[0], k[2], k[1]], [k[1], k[2], k[0]], [k[0], k[1], k[2]], [k[2], k[1], k[0]], [k[2], k[0], k[1]]]
a = [0] * 1500
co = 0
for i in range(6):
	for j in range(3):
		for l in range(j, 1500, b[i][j]):
			a[l] += 1
	if not 0 in a:
		co = 1
		print('YES')
		break
	else:
		a = [0] * 1500
if co == 0:
	print('NO')


def ans(k1, k2, k3):
	if k1 == 1:
		return 'YES'
	if k1 == 2 and k2 == 2:
		return 'YES'
	if k1 == 3 and k2 == 3 and (k3 == 3):
		return 'YES'
	if k1 == 2 and k2 == 4 and (k3 == 4):
		return 'YES'
	return 'NO'
(a, b, c) = [int(i) for i in input().split()]
k1 = min(a, b, c)
k3 = max(a, b, c)
k2 = a + b + c - k1 - k3
print(ans(k1, k2, k3))