Problem:


Score : 100 points

Problem Statement

Shichi-Go-San (literally "Seven-Five-Three") is a traditional event in a certain country to celebrate the growth of seven-, five- and three-year-old children.

Takahashi is now X years old. Will his growth be celebrated in Shichi-Go-San this time?

Constraints

1 ≤ X ≤ 9

X is an integer.

Input

Input is given from Standard Input in the following format:

X

Output

If Takahashi's growth will be celebrated, print YES; if it will not, print NO.

Sample Input 1

5

Sample Output 1

YES

The growth of a five-year-old child will be celebrated.

Sample Input 2

6

Sample Output 2

NO

See you next year.



Sample input:
5


Sample output:
YES

Submission status: Wrong Answer

Solution code:
import math

n = input()
if "9" in n:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())
x = [3, 5, 7]

for i in range(3):
    if X == x[i]:
        print('YES')
        break

    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
X = int(input())
x = [3, 5, 7]

for i in range(3):
    if X == x[i]:
        print('Yes')
        break

    else:
        print('No')

Submission status: Wrong Answer

Solution code:
x = int(input())
ans ="NO"
if 2<x<8 and x%2==1:
    ans ="YES"
print("ans")

Submission status: Wrong Answer

Solution code:
x = int(input())
ans ="NO"
if 2<x<8 and x%2==1:
    ans ="YES"
print("NO")

Submission status: Wrong Answer

Solution code:
x=int(input())
if x==3 or x==5 or x==7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x = int(input())
if x == (3 or 5 or 7):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == (7 or 5 or 3):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))


x = int(input())

if x==7 or x==5 or x==3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a=int(input())
if a==3 or a==5 or a==7:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a=int(input())
if a==(3 or 5 or 7):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
if int(input())==(3 or 5 or 7):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x = input()
if x in "753":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X = input()

if X == '3' or X == '5' or X == '7':
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x = int(input())

if x == 7 or x == 5 or x == 3:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
X=int(input())

if X==7 or X==5 or X==3:
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x=input()
if x==7 or x==5 or x==3:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
k = int(input())

if 105%k== 0: 
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
k = int(input())

if k%105== 0: 
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
A = int(input())
if (A == 7 or A==5 or A==3):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
A = int(input())
if (A == 7 or A==5 or A==3):
  print('Yes')
else:
  ('No')

Submission status: Wrong Answer

Solution code:
S = int(input())
if S==3 or S==5 or S==7:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
X = int(input())
l = [7,5,3]

if X in l:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math

#入力
#S = str(input())
#N, i = map(int, input().split())
#K = int(input())
X = int(input())

if X == 7 or X == 5 or X == 3 :
  print ("YES")
else :
  print ("No")

Submission status: Wrong Answer

Solution code:
print("YES" if (input() in (3,5,7)) else "NO")

Submission status: Wrong Answer

Solution code:
n=int(input())

def dfs(s):
  if n<int(s) : return 0
  res = 1 if all(s.count(c)>0 for c in "753") else 0
  for i in "753":
    res += dfs(s+i)
  return res

print(dfs("0"))

Submission status: Wrong Answer

Solution code:
X=int(input())
if X==5:
  print("YES")
else :
  print("NO")

Submission status: Wrong Answer

Solution code:
x=int(input())
li=[3,5,7]
if x in li:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n=input()
print("Yes" if "9" in n else "No")

Submission status: Wrong Answer

Solution code:
a = int(input())
list1 = [3,5,7]
if a in list1:
    print("YES")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x = int(input())
if x == 5 or x == 7 or x == 3:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X=int(input())
if X==3 or 5 or 7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
X = int(input())

if X in [7, 5, 3]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 3 or 5 or 7:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
if N == 3 or 5 or 7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == 7 or 5 or 3:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == 7 or 5 or 3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n%7 ==0 or n%5==0 or n%3==0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x = int(input())

if x == 3 or 5 or 7:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
if int(input()) == 7 or 5 or 3:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x=int(input())
if x in [7,5,3]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 7 or X== 5 or X== 3:
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
if n == 3 or n == 5 or n == 7:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == 7 or X == 5 or X == 3:
    print('YES')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import itertools

N = input()

A = []
nums = [3,5,7]
con = 0

for i in range(3,len(N) + 1):
  A += list(itertools.product(nums,repeat = i))

L = []

for i in range(0,len(A)):
  a = set(list(A[i]))
  if len(a) == 3:
    L.append(A[i])

Slist = []
    
for i in range(0,len(L)):
  S = ""
  for j in range(0,len(L[i])):
    S += str(L[i][j])
  S = int(S)
  Slist.append(S)

print(len([c for c in Slist if c <= int(N)]))

Submission status: Wrong Answer

Solution code:
X = int(input())
L = [3, 5, 7]
if X in L:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x=input()
if x ==3 or x == 5 or x == 7:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
N = int(input())
#print("Yes") if N == 7 or N == 5 or N == 3 else print("No")
if N == 7 or N == 5 or N == 3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
print("Yes") if N == 7 or N == 5 or N == 3 else print("No")

Submission status: Wrong Answer

Solution code:
print("Yes" if input() in "753" else "No")

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == 7 or X == 5 or X == 3:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x=input()
print('YES' if x==3 or x==5 or x==7 else 'NO')

Submission status: Wrong Answer

Solution code:
x=input()
print('Yes' if x==3 or x==5 or x==7 else 'No')

Submission status: Wrong Answer

Solution code:
x=input()
print('Yes' if x==3 or x==5 or x==7 else 'NO')

Submission status: Wrong Answer

Solution code:
x = int(input())
print('Yes' if x in [7, 5, 3] else 'No')

Submission status: Wrong Answer

Solution code:
x=int(input())
if x==3 or x==5 or x==7:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == 7:
  print("YES")
elif X == 5:
  print("YES")
elif X == 3:
  print("YES")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x = int(input())

if x==3 or x==5 or x==7:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x = input()
print("YES" if "753" in x else "NO")

Submission status: Wrong Answer

Solution code:
x = input()
if "753" in x:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x = int(input())
if "7" or "5" or "3" in x:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
str1 = input()

len1 = len(str1)
diff = 999

for x in range (len1-2):
    num = int(str1[x:x+3])
    if abs(num-753) <diff:
        diff = abs(num-753)
print (diff)

Submission status: Wrong Answer

Solution code:
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

l = [3,5,7]
if INT() in l:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N ==7 or N ==5 or N ==3:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x = int(raw_input())
if x == 3 or x == 5 or x == 7:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 3 or X == 5 or X == 3:
  print('YES')
  exit()
print('NO')

Submission status: Wrong Answer

Solution code:
a= int(input())

if (a == (3 or 5 or 7) ):
  print("YES")
else :
  print("NO")

Submission status: Wrong Answer

Solution code:
x = int(input())
if x == 3 or 5 or 7:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
X=int(input())
print('Yes' if X==7 or X==5 or X==3 else 'No')

Submission status: Wrong Answer

Solution code:
x = int(input())
print('YES' if x == 3 and x == 5 and x == 7 else 'NO')

Submission status: Wrong Answer

Solution code:
x = int(input())
print('YES' if x % 2 != 0 and x != 9 else 'NO')

Submission status: Wrong Answer

Solution code:
x = int(input())
print('YES' if (x % 2 != 0) & (x != 9) else 'NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
if n in [3,5,7]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = ['3', '5', '7']

depth = len(str(n)) 
ans = 0

def search(s, i):
  if s != '':
    if int(s) <= n and '3' in s and '5' in s and '7' in s:
      global ans
      ans += 1
  if i != 0:
    for _a in a:
      search(s + _a, i - 1)

search('', depth)

print(ans)

Submission status: Wrong Answer

Solution code:
x=int(input())
if x==(7 or 5 or 3):
    print('YES')

else:
    print('NO')

Submission status: Wrong Answer

Solution code:
N=int(input())
if N == 3 or N == 5 or N == 7:
  print("Yes")
  
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n == 7 or n == 5 or n == 3:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X=int(input())
if X==7:
  print('YES')
if X==5:
  print('YES')
if X==3:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
X=6
if (X == 3 or X == 5 or X == 7):
	print('YES')
else:
	print('NO')

Submission status: Wrong Answer

Solution code:
x = int(input())
if x==7 or x==5 or x==3:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

Solution code:
def main():
    X = int(input())

    if X % 3 == 0 or X % 5 == 0 or X % 7 == 0:
        print('YES')
    else:
        print('NO')


main()

Submission status: Wrong Answer

Solution code:
x=input()
'''if x==3 or x==5 or x==7:
    print('Yes')
else:
    print('No')
'''
if x in [7,5,3]:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
x=int(input())
'''if x==3 or x==5 or x==7:
    print('Yes')
else:
    print('No')
'''
if x in [7,5,3]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
if n in (3,5,7):
  print('YES')
else:
  print('no')

Submission status: Wrong Answer

Solution code:
x=int(input())
if x in [7,5,3]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x=int(input())
if x==3 or x==5 or x==7:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x=input()
if  "753" in x:
 print("Yes")
else:
   print("No")

Submission status: Wrong Answer

Solution code:
print(["No","Yes"][input()in"753"])

Submission status: Wrong Answer

Solution code:
print("NYoe s"[input()in"753"::2])

Submission status: Wrong Answer

Solution code:
X = input()
X = int(X)
if X == 7:
  print("YES")
elif X == 5:
  print("YSE")
elif X == 3:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
X = input()
if X == 7:
  print("YES")
elif X == 5:
  print("YSE")
elif X == 3:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x=int(input())
if x==3 or 5 or 7:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
X=map(int,input())

if (X==7)or(X==5)or(X==3):
    print('YES')
else :
    print('NO')

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)


def main():
    N = input()
    if N in '753':
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)


def main():
    N = input()
    if N in '753':
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    import time
    start = time.time()
    main()
    end = time.time() - start
    print(end*10**3, 'ms')

Submission status: Wrong Answer

Solution code:
x=int(input())
print('YES' if x%3==0 or x%5==0 or x%7==0 else 'NO')

Submission status: Wrong Answer

Solution code:
x=input()
List=['3','5','7']
if x in List:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x = input()
if x == 3 or x == 5 or x == 7:
    print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
x=input()
x=int(x)

if x==7:
  	print("Yes")
if x==5:
  	print("Yes")
if x==3:
  	print("Yes")
else:
  	print("No")

Submission status: Wrong Answer

Solution code:
x=input()
x=int(x)

if x==7:
  	print("Yes")
elif x==5:
  	print("Yes")
elif x==3:
  	print("Yes")
else:
  	print("No")

Submission status: Wrong Answer

Solution code:
w=int(input())
if w==7:
  print('Yes')
if w==5:
  print('Yes')
if w==3:
  print('Yes')
else:
  print ('No')

Submission status: Wrong Answer

Solution code:
w=int(input())
if w==7:
  print("Yes")
if w==5:
  print("Yes")
if w==3:
  print("Yes")
else:
  print ("No")

Submission status: Wrong Answer

Solution code:
x=int(input())

if x==7:
  	print("Yes")
if x==5:
  	print("Yes")
if x==3:
  	print("Yes")
else:
  	print("No")

Submission status: Wrong Answer

Solution code:
x=int(input())

if x==7:
  	print('Yes')
elif x==5:
  	print('Yes')
elif x==3:
  	print('Yes')
else:
  	print('No')

Submission status: Wrong Answer

Solution code:
x=int(input())

if x==7:
  	print("Yes")
elif x==5:
  	print("Yes")
elif x==3:
  	print("Yes")
else:
  	print("No")

Submission status: Wrong Answer

Solution code:
#1256

x = int(input())
if x == 7 or x == 5 or x == 3:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x = int(input())
if x == 7 or x == 5 or x == 3:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x = int(input())
if x == 3 or 5 or 7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x = int(input())
if x == (3 or 5 or 7):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
X = int(input())

ans = "No"
if (X == 3 or X == 5 or X == 7):
  ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
 
if x==7 or x==5 or x==3:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x = int(input())
 
if x==7 or x==5 or x==3:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x = int(input())

if x ==7 or x == 5 or x==3:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a=int(input())
if a == 3 or a == 5 or a == 7:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
X = int(input())
if(X == 3 or X == 5 or X == 7):
  print("yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
#114 753

X = int(input())

if X == 3 or X == 5 or X == 7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 3 or X == 5 or X == 7:
    print("YES")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 3 or X == 5 or X == 7:
  print("YES")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 7 or X == 5:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == 3 or X == 5 or X == 7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:

def main():

    N = int(input())

    if N == 3 or N== 5 or N == 7:
        print("Yes")
    else:
        print("No")
    


if __name__== "__main__":
    main()

Submission status: Wrong Answer

Solution code:
x=int(input())
res='No'
if x==7 or x==5 or x==3:
	res='Yes'
print(res)

Submission status: Wrong Answer

Solution code:
print('Yes' if input() in '753' else 'No')

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == 3 or X == 5 or X == 7:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x=input()
if x==3 or x==5 or x==7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
X = int(input())


if X == 3 or X == 5 or X == 7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
print("YNeos"[not(int(input())in[3,5,7])::2])

Submission status: Wrong Answer

Solution code:
x = int(input())
if x ==3 or x==5 or x==7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x=map(int,(input()))
if x==3 or x==5 or x==7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x=map(int,(input().split()))
if x==3 or x==5 or x==7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x = int(input())
print('Yes' if x==7 or x==5 or x==3 else 'No')

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**5)
N = int(input())

def rec(num, use, cnt):
    if num > N:
        return cnt

    if (use == 0b111):
        cnt += 1

    return rec(num*10+7, use | 0b100, cnt)\
        + rec(num*10+5, use | 0b010, cnt)\
        + rec(num*10+3, use | 0b001, cnt)

print(rec(0,0,0))

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**5)
N = int(input())

def rec(num ,cnt=0):
    if int(num) > N:
        return cnt

    if '7' in num and '5' in num and '3' in num:
        cnt += 1

    return rec('7'+num, cnt) + rec('5'+num, cnt) + rec('3'+num, cnt)

print(rec('7')+rec('5')+rec('3'))

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 7 or X == 5 or X ==3:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())
print('Yes' if X == 3 or X == 5 or X == 7 else 'No')

Submission status: Wrong Answer

Solution code:
X = int(input())

if X==3 or X==5 or X==7:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x = int(input())

if x == 3 or x == 5 or x == 7:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x = input()

if x == 3 or x == 5 or x == 7:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X=int(input())
if X==3 or X==5 or X==7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X=int(input())
if X==3 or X==5 or X==7:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 7:
  print("YES")
elif X == 5:
  print("YES")
elif X == 3:
  print("YES")

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == 3 or 5 or 7:
    print("YES")

else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x = int(input())
print("YES" if x == 3 or 5 or 7 else "NO" )

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == (3, 5, 7):
    print('YES')
    
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n=int(input())

if n==7 or n==5 or n==3:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

Solution code:
a=int(input())
if(a==7 or a==5 or a==3):
  print("Yes")
else:
  ("NO")

Submission status: Wrong Answer

Solution code:
S = input()

mini=999

for i in range(len(S)-2):
  if abs(753 - int(S[i:i+3])) < mini:
    mini = abs(753 - int(S[i:i+3]))

print(mini)

Submission status: Wrong Answer

Solution code:
X=input()
if X==("3" or "5" or "7"):
    print("YES\n")
else:
    print("NO\n")

Submission status: Wrong Answer

Solution code:
X=input()
if X==("3" or "5" or "7"):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n=input()
print("Yes" if n in "753" else "No")

Submission status: Wrong Answer

Solution code:
print('Yes' if int(input()) in [3, 5, 7] else 'No')

Submission status: Wrong Answer

Solution code:
x = int(input())

if x == 77 or x == 5 or x == 3:
    print("YES")

else:
    print("NO")

Submission status: Wrong Answer

Solution code:
X = input()
if X == 7:
    print("YES")
elif X == 5:
    print("YES")
elif X == 3:
    print("YES")
    
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
X = input()
if X == 7 and X== 5 and X == 3:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x = int(input())
if x in [3,5,7]:
  print('Yes')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
X = int(input())
if X in [3, 5, 7]:
    print("YES")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x = int(input())
if x == 7:
    print("YES")
elif x == 5:
    print("YES")
elif x == 7:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x = int(input())
if x == 7 or 5 or 3:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
X = [int(i) for i in input().split()]
if X == 3:
    print("YES")
elif X == 5:
    print("YES")
elif X == 7:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
X = [int(i) for i in input().split()]
if X == 3 or X == 5 or X == 7:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
age = int(input())
if age==3 or age==5 or age==7:
    print("YES")
else:
    print("N0")

Submission status: Wrong Answer

Solution code:
print("NYoe s"[int(input()) in [7,5,3]::2])

Submission status: Wrong Answer

Solution code:
a = int(input())
if a == 3 or 5 or 7:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a = int(input())
if a == 3 or 5 or 7:
  print('yes')
else:
  print('no')

Submission status: Wrong Answer

Solution code:
x = int(input())

if x == '7' or x == '5' or x == '3':
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
x = int(input())
if x in [3,5,7]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x = int(input())
if x == 3 or 5 or 7:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
print("Yes" if int(input()) in [7,5,3] else "No")

Submission status: Wrong Answer

Solution code:
X = int(input())
print('YES') if ((X is 7) or (X is 5) or (X is 3)) else('NO')

Submission status: Wrong Answer

Solution code:
X = int(input())
print('YES') if X is 7 or X is 5 or X is 3 else('NO')

Submission status: Wrong Answer

Solution code:
x=int(input())
l=[3,5,7]
print("YES" if x in l else "No")

Submission status: Wrong Answer

Solution code:
X = int(input())
 
if X==3 or X==5 or X==7:
    print("YES")
else:
    print("N0")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 3 or X == 5 or X == 7:
    print("YES")
else:
    print("N0")

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == 3 or X == 5 or X == 7:
    print("YES")
else:
    print("N0")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 3 and X == 5 or X == 7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x=int(input())
if x==7 or x==5 or x==3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
print('YES' if int(input()) <7 else "NO")

Submission status: Wrong Answer

Solution code:
print('Yes' if int(input()) <7 else "No")

Submission status: Wrong Answer

Solution code:
X = int(input())
print("YES" if X == 3 and X==5 and X==7 else "NO")

Submission status: Wrong Answer

Solution code:
y = input()
print(y in ['7','5','3'])

Submission status: Wrong Answer

Solution code:
N = int(input())
ret = 0
a = ['3','5','7']
for i in range(357, N+1):
    t = list(set(str(i))).sor()
    if t == a:
        ret += 1
print(ret)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n ==(3 or 5 or 7):
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
X = input()
X = int()
if X == 7 or X == 5 or X == 3:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
s=input()
imin=753
for i in range(len(s)-2):
	if abs(int(s[i]+s[i+1]+s[i+2])-753)<imin:
		imin=abs(int(s[i]+s[i+1]+s[i+2])-753)
print(imin)

Submission status: Wrong Answer

Solution code:
x=int(input())
if x==3:
	print("Yes")
elif x==5:
	print("Yes")
elif x==7:
	print("Yes")	
else:	
	print("No")

Submission status: Wrong Answer

Solution code:
i = input()
if i==5:
  print("yes")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 3 or 5 or 7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
bit = [3,5,7]
X = int(input())
if(X in bit):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X ==3 | X == 5| X==7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
def age_check(age):
  if age == 3 or age == 5 or age == 7:
    print('YES')
  else:
    print('NO')

Submission status: Wrong Answer

Solution code:
age= int(input())
if age==7 and 5 and 3:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
age= int(input())
if age==7 or 5 or 3:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
def age_check(age):
  if age ==3:
    print('YES')
  elif age ==5:
    print('YES')
  elif age == 7:
    print('YES')
  else:
    print('NO')
 
age = input()
 
age_check(age)

Submission status: Wrong Answer

Solution code:
x = input()
if x == 7 or x == 5 or x == 3:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x= int(input())
if x ==7 or x==5 or x==3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x= int(input())
if x in [7,5,3]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x = input()
if x == "7"or"5"or"3":
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X==3 or X==5 or X==7:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X=int(input())
if X == 3 or X == 5 or X == 7:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 7 or X == 5 or X == 3:print("Yes")
else:print("No")

Submission status: Wrong Answer

Solution code:
X=int(input())
if X == 7 or X == 5 or X == 3:print("Yes")
else:print("No")

Submission status: Wrong Answer

Solution code:
x  = int(input())
if x == 3 or x == 5 or x == 7:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:

num = input()

if num == 5:
    print("YES") 

elif num == 7:
    print("YES") 

elif num == 3:
    print("YES") 

else:
    print("NO")

Submission status: Wrong Answer

Solution code:
X = int(input())

if X == 7 or X == 5 or X == 3:
    print('YES')

print('NO')

Submission status: Wrong Answer

Solution code:
print('NYoe s'[input()in'357'::2])

Submission status: Wrong Answer

Solution code:
x=map(int,input().split(' '))
if x==3 or x==5 or x==7:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
S= input()
if S==3 or S==5 or S==7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
S= input()
if S==3 or S==5 or S==7:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X = int(input())

if X % 7 == 0 or X % 5 == 0 or X % 3 == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x=input()
if x=='3' or '5' or '7':
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
X = int(input())
if X in [7, 5, 3]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x = input()
if x ==3 or x == 5 or x == 7:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x = input()
if x ==3 or 5 or 7:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
X=int(input())
if X ==3 or 5 or 7:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
x = int(input())
if(x==7 or x==5 or x==3):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def main114():
    import numpy as np

    S = input()
    answer = 0

    digit1 = []
    digit2 = []
    digit3 = []

    for i in range(len(S)):
        digit1.append(abs(7 - int(S[i])))
        digit2.append(abs(5 - int(S[i])))
        digit3.append(abs(3 - int(S[i])))

    first = [i for i, x in enumerate(digit1) if x == min(digit1) and i < len(digit1) - 2]

    if len(first) == 1:
        answer = int(S[first[0]]) * 100 + int(S[first[0] + 1]) * 10 + int(S[first[0] + 2])

    elif len(first) > 1:
        digit2_new = []
        for i in range(len(first)):
            digit2_new.append(digit2[first[i] + 1])

        second = [i for i, x in enumerate(digit2) if x == min(digit2_new) and i < len(digit2) - 1]
        if len(second) == 1:
            answer = int(S[first[0]]) * 100 + int(S[second[0]]) * 10 + int(S[second[0] + 1])
        elif len(second) > 1:
            digit3_new = []
            for i in range(len(second)):
                digit3_new.append(digit3[second[i] + 1])

            third = [i for i, x in enumerate(digit3) if x == min(digit3_new) and i < len(digit3)]
            answer = int(S[first[0]]) * 100 + int(S[second[0]]) * 10 + int(S[third[0]])

    answer = abs(753 - answer)
    print(answer)


main114()