-----Input-----

The only line of the input contains a string of digits. The length of the string is between 1 and 10, inclusive.


-----Output-----

Output "Yes" or "No".


-----Examples-----
Input
373

Output
Yes

Input
121

Output
No

Input
436

Output
Yes

Source: codeforces | Difficulty: HARD
Tags: Implementation


Solutions:
p = input()
l = len(p) - 1
ans = ''
s = ['23', '10', '30', '11', '13', '12', '31', '33', '32', '21']
for x in p:
	ans += s[ord(x) - 48]
if ans == ans[::-1]:
	print('Yes')
else:
	print('No')


def _bool(s):
	a = (8, -1, -1, 3, 6, 9, 4, 7, 0, 5)
	for i in range(len(s)):
		if a[int(s[i])] != int(s[len(s) - i - 1]):
			return False
	return True
s = input()
if _bool(s):
	print('Yes')
else:
	print('No')


s = input()
r = s
s = s.replace('6', 'a')
s = s.replace('4', '6')
s = s.replace('a', '4')
s = s.replace('5', 'a')
s = s.replace('9', '5')
s = s.replace('a', '9')
s = s.replace('8', 'a')
s = s.replace('0', '8')
s = s.replace('a', '0')
s = s.replace('1', 'a')
s = s.replace('2', 'a')
print('YNeos'[r != s[::-1]::2])


m = {}
m['0'] = '8'
m['1'] = 'x'
m['2'] = 'x'
m['3'] = '3'
m['4'] = '6'
m['5'] = '9'
m['6'] = '4'
m['7'] = '7'
m['8'] = '0'
m['9'] = '5'
x = list(input())
y = list(reversed([m[c] for c in x]))
print('Yes' if x == y else 'No')


mirror = [8, -1, -1, 3, 6, 9, 4, 7, 0, 5]

def dg(n):
	if n:
		res = []
		while n:
			res.append(n % 10)
			n //= 10
	else:
		res = [0]
	return res
n = int(input())
dg1 = dg(n)
dg2 = [mirror[d] for d in reversed(dg1)]
if dg1 == dg2:
	print('Yes')
else:
	print('No')


n = input()
for i in range(len(n)):
	if n[i] == '1' or n[i] == '2':
		print('No')
		exit(0)
	elif (n[i] == '3' or n[i] == '7') and n[-i - 1] != n[i]:
		print('No')
		exit(0)
	elif n[i] == '4' and n[-i - 1] != '6':
		print('No')
		exit(0)
	elif n[i] == '6' and n[-i - 1] != '4':
		print('No')
		exit(0)
	elif n[i] == '5' and n[-i - 1] != '9':
		print('No')
		exit(0)
	elif n[i] == '9' and n[-i - 1] != '5':
		print('No')
		exit(0)
	elif n[i] == '8' and n[-i - 1] != '0':
		print('No')
		exit(0)
	elif n[i] == '0' and n[-i - 1] != '8':
		print('No')
		exit(0)
print('Yes')


def solve(s):
	s1 = [' *', '* ', '* ', '**', '**', '* ', '**', '**', '* ', ' *']
	s2 = ['**', '  ', '* ', '  ', ' *', ' *', '* ', '**', '**', '* ']
	(x, y) = ('', '')
	for ch in s:
		x += s1[ord(ch) - ord('0')]
		y += s2[ord(ch) - ord('0')]
	return x == x[::-1] and y == y[::-1]
print('Yes' if solve(input()) else 'No')


d = {'0': '8', '1': -1, '2': -1, '3': '3', '4': '6', '5': '9', '6': '4', '8': '0', '7': '7', '9': '5'}
s = input()
print('Yes' if list(s)[::-1] == list([d[c] for c in s]) else 'No')


a = {'3': '3', '4': '6', '6': '4', '5': '9', '9': '5', '7': '7', '8': '0', '0': '8', '1': 'x', '2': 'x'}
s = input()
f = 1
for i in range(len(s)):
	if s[i] != a[s[len(s) - i - 1]]:
		f = 0
if f:
	print('Yes')
else:
	print('No')


d = {'0': '8', '3': '3', '4': '6', '5': '9', '6': '4', '7': '7', '8': '0', '9': '5'}
s = input()
s1 = ''.join((d[c] for c in reversed(s) if c in d))
if s == s1:
	print('Yes')
else:
	print('No')


a = [8, -1, -1, 3, 6, 9, 4, 7, 0, 5]
s = input()
print('Yes') if all((a[int(s[i])] == int(s[len(s) - i - 1]) for i in range(len(s)))) else print('No')


s = input()
s1 = ''
for i in s:
	if i == '0':
		s1 += '8'
	elif i == '1':
		s1 += ''
	elif i == '2':
		s1 += ''
	elif i == '3':
		s1 += '3'
	elif i == '4':
		s1 += '6'
	elif i == '5':
		s1 += '9'
	elif i == '6':
		s1 += '4'
	elif i == '7':
		s1 += '7'
	elif i == '8':
		s1 += '0'
	elif i == '9':
		s1 += '5'
if s != s1[::-1]:
	print('No')
else:
	print('Yes')


m = [8, -1, -1, 3, 6, 9, 4, 7, 0, 5]
a = input()
l = len(a)
print('Yes' if all((m[ord(a[i]) - 48] == ord(a[l - i - 1]) - 48 for i in range(l))) else 'No')


import sys
import time
for line in sys.stdin:
	ll = len(line) - 1
	fail = 0
	for i in range(ll):
		if i == ll - 1 - i:
			if int(line[i]) not in [3, 7]:
				fail = 1
			continue
		x = int(line[i])
		y = int(line[ll - 1 - i])
		if (x, y) not in [(3, 3), (4, 6), (6, 4), (7, 7), (8, 0), (0, 8), (5, 9), (9, 5)]:
			fail = 1
	if fail:
		print('No')
	if not fail:
		print('Yes')


R = [('1', "' "), ('2', ': '), ('3', "''"), ('4', "':"), ('5', "'."), ('6', ":'"), ('7', '::'), ('8', ':.'), ('9', ".'"), ('0', '.:')]
s = input()
for (a, b) in R:
	s = s.replace(a, b)
print('Yes' if s == s[::-1] else 'No')


print(['No', 'Yes'][(lambda x: min([x[i] + x[::-1][i] in ['33', '46', '59', '77', '80', '64', '95', '08'] for i in range(len(x))]))(input())])


a = input()
d = {'0': '8', '1': '-', '2': '-', '3': '3', '4': '6', '5': '9', '6': '4', '7': '7', '8': '0', '9': '5'}
for i in range(len(a)):
	if d[a[i]] != a[len(a) - i - 1]:
		print('No')
		exit(0)
print('Yes')


import sys
s = input()
pairs = [(3, 3), (4, 6), (5, 9), (6, 4), (7, 7), (8, 0), (9, 5), (0, 8)]
for l in range(len(s) // 2 + 1):
	r = len(s) - l - 1
	if l == r and int(s[l]) not in [3, 7]:
		print('No')
		sys.exit(0)
	elif (int(s[l]), int(s[r])) not in pairs:
		print('No')
		sys.exit(0)
print('Yes')


mp = [8, -1, -1, 3, 6, 9, 4, 7, 0, 5]
str = input()
for i in range(len(str)):
	if ord(str[i]) - ord('0') != mp[ord(str[len(str) - 1 - i]) - ord('0')]:
		exit(print('No'))
print('Yes')


s = input()
n = len(s)
if n % 2 is 0:
	hf = int(n / 2)
else:
	hf = int(n / 2) + 1
ck = 0
if n is 1:
	if s is not '3' and s is not '7':
		print('No')
		ck = 1
else:
	for i in range(0, hf):
		if i is hf - 1 and n % 2 is not 0:
			if s[i] is not '3' and s[i] is not '7':
				print('No')
				ck = 1
				break
		elif s[i] == '8' and s[n - 1 - i] == '0':
			continue
		elif s[i] == '0' and s[n - 1 - i] == '8':
			continue
		elif s[i] == '5' and s[n - 1 - i] == '9':
			continue
		elif s[i] == '9' and s[n - 1 - i] == '5':
			continue
		elif s[i] == '4' and s[n - 1 - i] == '6':
			continue
		elif s[i] == '6' and s[n - 1 - i] == '4':
			continue
		elif s[i] == '3' and s[n - 1 - i] == '3':
			continue
		elif s[i] == '7' and s[n - 1 - i] == '7':
			continue
		else:
			print('No')
			ck = 1
			break
if ck is 0:
	print('Yes')


f = {'0': '23', '1': '10', '2': '30', '3': '11', '4': '13', '5': '12', '6': '31', '7': '33', '8': '32', '9': '21'}
n = input()
s = ''
for i in n:
	s += f[i]

def check(s):
	for i in range(len(s)):
		if s[i] != s[-i - 1]:
			return 0
	return 1
print('Yes' if check(s) else 'No')


n = str(input())
s = ''
for i in range(len(n)):
	if n[i] == '1' or n[i] == '2':
		s = s + '.'
	elif n[i] == '3' or n[i] == '7':
		s = s + n[i]
	elif n[i] == '4':
		s = s + '6'
	elif n[i] == '6':
		s = s + '4'
	elif n[i] == '5':
		s = s + '9'
	elif n[i] == '9':
		s = s + '5'
	elif n[i] == '0':
		s = s + '8'
	elif n[i] == '8':
		s = s + '0'
k = ''
for i in range(len(n) - 1, -1, -1):
	k = k + s[i]
if k != n:
	print('No')
else:
	print('Yes')