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 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(S) - 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(S) - 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(S)]
        answer = int(S[first[0]]) * 100 + int(S[second[0]]) * 10 + int(S[third[0]])

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

Submission status: Wrong Answer

Solution code:
y=int(input())
if y==3:
  print('Yes')
elif y==5:
  print('Yes')
elif y==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:
s=input();print(min(abs(int(s[i:i+3])-753)for i in [0]*len(s)))

Submission status: Wrong Answer

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

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 == 3 or 5 or 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')
else:
    print('no')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
yo = int(input()) 

if yo % 7 == 0 or yo % 5 == 0 or yo % 3 == 0:
  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==3 or X==5 or X==7:
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
N=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==3 or N==5 or N==7:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
D = int(input())
if D == 7 or D == 5 or D == 3:
    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:
x = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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())
print("Yes" if X in [7,5,3] else "No")

Submission status: Wrong Answer

Solution code:
X = input()

if X in ['3', '5', '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:
S = input()
SS = 99999999999
for i in range(0, len(S)):
    for j in range(0, i):
        for k in range(0, j):
            X = int(S[k] + S[j] + S[i])
            if abs(753 - X) < SS:
                SS = abs(753 - X)
print(SS)

Submission status: Wrong Answer

Solution code:
x = int(input())
if 3 <= x <= 7 and x % 2 != 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x = raw_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:
x = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
X=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())
shichigosan = [7, 5, 3]
if X in shichigosan:
    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:
import numpy as np

i = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
str1=input('年齢')
num=int(str1)
if num==3 or num==5 or num==7:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
str1=input('年齢')
num=int(str1)
if num==3 and num==5 and num==7:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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



if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
s = int(input())
if s==3 & s==7 & s==5:
 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:
s = input()
if s==3 or s==5 or s==7:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
n = input()
N = int(n)

a = int((n[-3:]))

y = 0
if a >= 753:
    x = 6
elif a >= 735:
    x = 5
elif a >= 573:
    x = 4
elif a >= 537:
    x = 3
elif a >= 375:
    x = 2
elif a >= 357:
    x = 1
elif a < 356:
    x =0

for i in range(0, len(n)-3):
    if int(n[i]) == 0:
        y = y
    elif int(n[i]) >=7:
        y += (len(n) - i) * 3 - 9
    elif int(n[i]) >=5:
        y += (len(n) - i) * 3 - 10
    elif int(n[i]) >= 3:
        y += (len(n) - i) * 3 - 11
    elif int(n[i]) == 2 or 1:
        y += (len(n) - i) * 3 - 12

print(x + y)

Submission status: Wrong Answer

Solution code:
age = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import random
ans=['YES','NO']
print(random.choice(ans))

Submission status: Wrong Answer

Solution code:
import random
ans=['YES','NO']
print(random.choice(ans))

Submission status: Wrong Answer

Solution code:
X = 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 == ("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:
s = input()
min = 999
for i in range(len(s)-2):
    l = abs(int(s[i:i+3]) - 753)
    if min > l:
        min = l
print(min)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N == 7 or 5 or 3:
    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:
N = int(input())
if N == 7 or 5 or 3:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
print({True:"YES",False:"NO"}[(int(input()) in [3,4,5])])

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt = 0
for i in range(n):
    st = str(i+1)
    if ("7" in st) and ("5" in st) and ("3" in st) \
       and not("1" in st) and not("2" in st) and not("4" in st) \
       and not("6" in st) and not("8" in st) and not("9" in st) and not("0" in st):
        cnt = cnt + 1
print(cnt)

Submission status: Wrong Answer

Solution code:
print({True:"YES",False:"NO"}[(int(input()) in [3,4,5])])

Submission status: Wrong Answer

Solution code:
s = input()
sz = len(s)
ans = 1000
for i in range(len(s)):
    p = s[i:i+3]
    if(len(p) == 3):
        diff = abs(753 - int(p));
        if(ans > diff):
            ans = diff
        
print(ans)

Submission status: Wrong Answer

Solution code:
{True:"YES",False:"NO"}[(int(input()) in [3,4,5])]

Submission status: Wrong Answer

Solution code:
D = int(input())

if D == 25:
    print('Christmas')
elif D == 24:
    print('Christmas Eve')
elif D == 23:
    print('Christmas Eve Eve')
else:
    print('Christmas Eve Eve Eve')

Submission status: Wrong Answer

Solution code:
d = int(input())

if d == 25:
    print("Christmas")
elif d == 24:
    print("Christmas Eve")
elif d == 23:
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")

Submission status: Wrong Answer

Solution code:
a=raw_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 '3' or '5' or '7' in X:
  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:
n = int(input()) 
if (n%5 == 0 or n%3 == 0 or n%7 ==0) and n%9!=0:
    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 <= 5:
  print("YES")
else:
  print("NO")

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())

if x > 5:
  print("YES")
else:
    print("NO")

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("name?\n"))

if x == 3 or x == 5 or x == 7:
	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:
s = input()
n = len(s)
base = int(s)
for i in range(n-2):
    ans = int(s[i])*100 + int(s[i+1])*10 + int(s[i+2])
    if abs(753-base) > abs(753 - ans):
        base = ans
print(abs(753-base))

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)
base = int(s)
for i in range(n-2):
    ans = int(s[i])*100 + int(s[i+1])*10 + int(s[i+2])
    if abs(753-base) > abs(753 - ans):
        base = ans
        print(base)
print(abs(753-base))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# A

s = input() # 1行読み込む（文字列）
X = int(s) # 文字列を数字に変換

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

Submission status: Wrong Answer

Solution code:
# A

s = input() # 1行読み込む（文字列）
X = int(s) # 文字列を数字に変換

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

Submission status: Wrong Answer

Solution code:
X = int(input())
if X == 3 or X == 5or 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:
S = input()
min = 5000
for i in range(len(S) - 2):
    diff = abs(int(S[i:i+3]) - 753)
    if diff < min:
        min = diff

print(min)

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:
n=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
if 1<= X and X <= 9:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
X = int(input())
if 1<= X and X <= 9:
    print('NO')
else:
    print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = int(input())
print("Yes" if A == 3 or A == 5 or A == 7 else "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:
S = input()


ans = 753

for i in range(len(S) - 2) :
    N = int(S[i:i+3])
    M = abs(753 - N)
    if ans > M :
        ans = M

print(ans)

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:
n=int(input())
d=dict()
for m in range(1,n+1):
    while m>1:
        for i in range(2,int(m**0.5)+1):
            if m%i==0:break
        else:i=m
        d[i]=d.get(i,0)+1
        m/=i
def num(n):
    return len(list(filter(lambda x:x>=n,d.values())))

print(num(74)+ num(24)*(num(2)-1)+ num(14)*(num(4)-1)+ num(4)*(num(4)-1)*(num(2)-2)//2)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []

def judge(x):
    y = x
    for i in range(2,x):
        kk = y % i
        if i*i > x:
            return 1
        if kk == 0:
            return 0
    return 1

def solve(prime,x):
    cnt = 0
    while x:
        cnt += x//prime
        x //= prime
    return cnt

for i in range(2,n):
    if judge(i):
        a.append(i)
ans = 0
if n < 3:
    ans = 0
else:
    ll = len(a)
    a2 = 0
    a4 = 0
    a14 = 0
    a24 = 0
    a74 = 0
    for i in range(ll):
        kk = solve(a[i],n)
        if kk >=2:
            a2 += 1
        if kk >=4:
            a4 += 1
        if kk >=14:
            a14 += 1
        if kk >=24:
            a24 += 1
        if kk >=74:
            a74 += 1
    print(a4*(a4-1)//2*(a2-2)+a14*(a4-1)+a24*(a2-1)+a74)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []

def judge(x):
    y = x
    for i in range(2,x):
        kk = y % i
        if i*i > x:
            return 1
        if kk == 0:
            return 0
    return 1

def solve(prime,x):
    cnt = 0
    while x:
        cnt += x//prime
        x //= prime
    return cnt

for i in range(2,n):
    if judge(i):
        a.append(i)
ans = 0
if n <= 3:
    ans = 0
else:
    ll = len(a)
    a2 = 0
    a4 = 0
    a14 = 0
    a24 = 0
    a74 = 0
    for i in range(ll):
        kk = solve(a[i],n)
        if kk >=2:
            a2 += 1
        if kk >=4:
            a4 += 1
        if kk >=14:
            a14 += 1
        if kk >=24:
            a24 += 1
        if kk >=74:
            a74 += 1
    print(a4*(a4-1)//2*(a2-2)+a14*(a4-1)+a24*(a2-1)+a74)

Submission status: Wrong Answer

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

sa = None

for i in range(len(y) - 2):
    z = str(x)[i:3+i]
    bbb = abs(int(z) - 753)

    if not sa:
        sa = bbb
    
    if sa > bbb:
        sa = bbb

print(sa)

Submission status: Wrong Answer

Solution code:
x = int(input())
y = x
a = []
while y:
    a.append(y%10)
    y = y//10
a.reverse()
if len(a)<=3:
    print(abs(x-753))
else:
    ans = 1000000
    ll = len(a)
    for i in  range(0,ll-2):
        ans=min(ans,abs(a[i]*100+a[i+1]*10+a[i+2]-753))
        #print(a[i]*100+a[i+1]*10+a[i+2])
    print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
ans=999
for i in range(len(s)-2):
  ans=min(abs(753-int(s[i:i+3])),ans)
print(ans)

Submission status: Wrong Answer

Solution code:
x=input()
["NO","YES"][x=="3" or x=="5" or x=="7"]

Submission status: Wrong Answer

Solution code:
def is753(n):
    s = str(n)
    ans = False
    if s.find('3') != -1 and s.find('5') != -1 and s.find('7') != -1:
        ans = True
    return ans

N = int(input())

nums = [3,5,7]
for i in range(8):
    PrevNums = nums.copy()
    for n in PrevNums:
        nums.append(n * 10 + 3)
        nums.append(n * 10 + 5)
        nums.append(n * 10 + 7)

nums = set(nums)
nums2 = list()
for n in nums:
    if is753(n) :
        nums2.append(n)

nums2.sort()
ans = 0
for i in range(len(nums2)):
    if nums2[i] >= N:
        ans = i
        break
    ans = len(nums2)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = int(input())
if s == 3 or 5 or 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<=0 or 10<=X:
  print("error")
  
elif X==3 or X==5 or X==7:
  print("Yes")
  
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = int(input('age'))
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 in (7, 5, 3):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
x = input()

if x in range(1, 9) and x in (7, 5, 3):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
def check753(self):
    if self in range(1, 9) and self 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:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
order = len(str(n))-1
number = order*(order-1)*(order-2)*3**(order-3)
for i in range(10**(order),n+1):
    l = list(str(i))
    if "7" in l and "5" in l and "3" in l:
        if not "0" in l and not "1" in l and not "2" in l and not "4" in l and not "6" in l and not "8" in l and not "9" in l:
            number += 1
print(int(number))

Submission status: Wrong Answer

Solution code:
n = int(input())
order = len(str(n))-1
number = order*(order-1)*(order-2)*3**(order-3)
for i in range(10**(order),n+1):
    l = list(str(i))
    if "7" in l and "5" in l and "3" in l:
        if not "0" in l and not "1" in l and not "2" in l and not "4" in l and not "6" in l and not "8" in l and not "9" in l:
            number += 1
print(number)

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())

def dfs(s):
    if int(s) > N:
        return 0
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs(s+c)
    return ret

print(dfs('0'))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
n_list=[i for i in range(n)]
cnt=0
for i in range(n):
    if str(n_list[i]).count('3') >= 1:
        if str(n_list[i]).count('5') >= 1:
            if str(n_list[i]).count('7') >= 1:
                if str(n_list[i]).replace('3','').replace('5','').replace('7','') == "":
                    cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
INF = 10 ** 18
MOD = 10 ** 9 + 7

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

Submission status: Wrong Answer

Solution code:
# Title: Shichi-Go-San
# Link: https://abc114.contest.atcoder.jp/tasks/abc114_a

import sys


sys.setrecursionlimit(10 ** 6)

read_single_int = lambda: int(sys.stdin.readline().strip())


def solution(x: int):
    if x == 3 or x == 5 or x == 9:
        return 'YES'
    return 'NO'


def main():
    x = read_single_int()
    print(solution(x))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
 
def main():
    x = sys.stdin.read()
    if x == 7 or x == 5 or x == 3:
        print("YES")
    else:
        print("NO")
 
if __name__ == "__main__":
    main()

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 == 3 or X == 5:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
print("YES" if input()==("3" or "5" or "7") else "NO")

Submission status: Wrong Answer

Solution code:
if int(input()) in [3,5,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())
ans = 'No'
if X == 3 or X == 5 or X ==7:
	ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
nd = len(str(n))
if n <= 356:
    print 0
else:
    a3 = [357, 375, 537, 573, 735, 753]
    arr_a = [[]for i in range(nd-2)]
    arr_a[0] = a3
    all_num = [357, 375, 537, 573, 735, 753]
    for i in range(1, nd-2):
        for j in arr_a[i-1]:
            arr_a[i].append(j*10+3)
            arr_a[i].append(j*10+5)
            arr_a[i].append(j*10+7)
        for k in arr_a[i]:
            all_num.append(k)
    # print arr_a
    
    def only_2kind(a,b,n):
        if n <= 3:
            return []
        else:
            all_num = []
            o = [10 * a + b, 10 * b + a, 10 * a + a, 10 * b + b]
            for j in range(n-3):
                o2 = []
                for i in range(len(o)):
                    o2.append(o[i]*10+a)
                    o2.append(o[i] * 10 + b)
                # print o2
                for i in range(len(o2)):
                    if o2[i] != int(str(a)*(j+3)) and o2[i] != int(str(b) * (j + 3)):
                        all_num.append(o2[i]*10+(15-a-b))
                o = o2
            return all_num
    
    all_num+=(only_2kind(3,5,nd)+only_2kind(5,7,nd)+only_2kind(3,7,nd))
    all_num.append(n)
    all_num.sort()
    # print len(all_num)
    # for i in all_num:
    #     print i
    print all_num.index(n)

Submission status: Wrong Answer

Solution code:
# your code goes here
max = int(input())
count=0
for x in range(1, max+1):
  for y in range(0, len(str(x))):
    currentNum = int(str(x)[y])
    if currentNum == 7 or currentNum == 5 or currentNum == 3:
      if y+1 == len(str(x)):
        count = count+1
    else:
      break
print (count)

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:
max = int(input())
count=0
for x in range(1, max):
  for y in range(1, len(str(x))):
    currentNum = x[y]
    if currentNum == 7 or currentNum == 5 or currentNum == 3:
      if y == len(str(x)):
        count = count+1
    else:
      break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
r=filter
f=lambda c:sum([map(lambda z:z+y,f(c-1))for y in'357'],[]) if c!=0 else ['']
print(sum([len(r(lambda y:y==3,map(lambda x:len(set(sorted(x))),r(lambda z:int(z)<=N,f(e+1)))))for e in range(10)]))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
X = int(input())
def f(n):
  if (n == 3)or(n == 5)or(n == 7):
    print("YES")
  else:
    print("NO")
    
print("{}".format(f(X)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(["NO","YES"][input()in["357"]])

Submission status: Wrong Answer

Solution code:
S=input();print(min(abs(int(S[i:i+3])-753)for i in range(len(S))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

def dfs(s): # 文字列 s で始まる七五三数の個数
	if int(s) > N:
		return 0
	ret = 1 if all(s.count(c) > 0 for c in '753') else 0 # s 自体が七五三数なら +1
	for c in '753':
		ret += dfs(s + c)
	return ret

print(dfs('0')) # 本当は dfs('') と書きたいが 4 行目でのエラーを防ぐため仕方なく

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
a = int(input())
c = str(a)
b = 0
"""
if (b >= 357):    
    for i in range(357, a):
"""


keta = int (math.log10(a) + 1)
list = []
if a >= 357:
    count = 0
    for i in range(3, keta):
        c = 1
        b = 3
        for j in range(0, i):
            c *= 3
            b *= 2
        list.append(c - b +3)
    start = pow(10, keta - 1) * 3
    while start - 1 <= a:
        start += 1
        flg3 = 0
        flg5 = 0
        flg7 = 0

        if math.floor(start / (pow(10, keta - 1))) == 4:
            start += pow(10, keta - 1)
        if math.floor(start / (pow(10, keta - 1))) == 6:
            start += pow(10, keta - 1)
        if math.floor(start / (pow(10, keta - 1))) == 8:
            break
 
        for j in range(0, keta):
            if (str(start)[j] == "3"):
                flg3 = 1
            elif (str(start)[j] == "5"):
                flg5 = 1
            elif (str(start)[j] == "7"):
                flg7 = 1
            else:
                break
            if (j == keta - 1 and flg3 == 1 and flg5 == 1 and flg7 == 1):
                count += 1
                
    b = count + sum(list)
print(b)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import math
a = int(input())
c = str(a)
b = 0
"""
if (b >= 357):    
    for i in range(357, a):
"""


keta = int (math.log10(a) + 1)
list = []
if a >= 357:
    count = 0
    for i in range(3, keta):
        c = 1
        b = 3
        for j in range(0, i):
            c *= 3
            b *= 2
        list.append(c - b +3)
    start = pow(10, keta - 1) * 3
    print(a / pow(10, keta - 1))
    while start - 1 <= a:
        start += 1
        flg3 = 0
        flg5 = 0
        flg7 = 0

        if math.floor(start / (pow(10, keta - 1))) == 4:
            start += pow(10, keta - 1)
        if math.floor(start / (pow(10, keta - 1))) == 6:
            start += pow(10, keta - 1)
        if math.floor(start / (pow(10, keta - 1))) == 8:
            break
 
        for j in range(0, keta):
            if (str(start)[j] == "3"):
                flg3 = 1
            elif (str(start)[j] == "5"):
                flg5 = 1
            elif (str(start)[j] == "7"):
                flg7 = 1
            else:
                break
            if (j == keta - 1 and flg3 == 1 and flg5 == 1 and flg7 == 1):
                count += 1
                
    b = count + sum(list)
print(b)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import itertools
x = int(input())
l = [3, 5, 7]

h = itertools.combinations_with_replacement(l, 4)

cnt = 0
for v in itertools.combinations_with_replacement(l, 4):
    if (3 in v and 5 in v and 7 in v):
        num = v[0]+v[1]+v[2]+v[3]
        if int(num) < x:
            cnt += 1

h_list = list(itertools.combinations_with_replacement(l, 4))

print (cnt)

Submission status: Wrong Answer

Solution code:
s = input()
n = 1000
for i in range(0, len(s)-4):
    b = int(s[i:i + 3])
    c = 753 - b
    if c < 0:
        c = c * (-1)
    if n > c:
        n = c
if n > int(s[len(s)-3:]):
    n = int(s[len(s)-3:])
print(n)