peterverebics/CodeNet_Python_118 huggingface dataset:
a = input()
if '7' in a:
  print("YES")
else:
  print("NO")
import math
from functools import reduce
from itertools import product

def gcd(*numbers):
    return reduce(math.gcd, numbers)

n = int(input())

l = product(range(1, 1+n), repeat=3)

print(sum([gcd(*i) for i in l]))
n = input()
isSeven = False


for i in n:
  if n == "7":
    isSeven = True
if(isSeven):
  print("Yes")
else:
  print("No")
import math
from functools import reduce
def gcd(*numbers):
    return reduce(math.gcd, numbers)

K=int(input())
ans=0
for a in range(1,K+1):
    for b in range(1, K + 1):
        for c in range(1,K+1):
            ans+=gcd(a,b,c)
print(ans)
n = input()
if "7" in n:
    print("yes")
else:
    print("no")
n=int(input())
flag=0
while(n>0):
    if(n%10==7):
        flag=1 
        break
    n=n/10
if(flag==1):
    print("Yes")
else:
    print("No")
N = int(input())
m = 0
for i in range(N+1):
  if not i % 3 == 0 or i % 5 == 0:
    m += i
 
print (m)
import re

str = input()

if re.match(str, "7"):
  print("Yes")
else:
  print("No")
n = int(input())
li = map(int, list(str(n)))
if '7' in li:
    print('Yes')
else:
    print('No')
n = input().split()
n = [int(i) for i in n]
f = 0

for i in n:
 if i == 7:
  f = 1

 if f ==1:  print("Yes")
 else: print("No")
n = int(input())

a = n//100
b, c = divmod(n, 10)
if a == 7 or b == 7 or c == 7:
	print("Yes")
else:
	print("No")
from math import *

K = int(input())

sum = 0
for i in range(K):
  for j in range(K):
    for k in range(K):
      sum += gcd((i+1),gcd((j+1),(k+1)))

print(sum)
a = input()
b=list(a)
res= 0
for i in b:
    if i == '7':
        print("yes")
        res = res+1

if res == 0:
    print("no")
n=int(input())
judge = False

string = str(n)
for i in range(len(string)):
  if(string[i] == "7"):
    judge = True

if(judge):
  print("YES")
else:
  print("NO")
n = int(input())
flag = False

while(n>0):
    if n%10==7:
        flag = True
        break
    n/=10

if flag:
    print("Yes")
else:
    print("No")
n = int(input())
result = 0
for i in range(1,n):
    if i % 5 == 0:
        result = result
    elif i % 3 == 0:
        result = result
    else:
        result += i
print(result)
A = input()
for a in range(3):
  if A[a] == '7':
    print('yes')
    break
  if a == 2:
    print('No')
N = int(input())
a=0
for i in range(2):
    if N % 10 == 7:
        a=1
    N = N % 10
if a >= 1:
    print('Yes')
else:
    print('No')
N = input().split('7')
print(N)
if len(N)>1:
    ans = 'Yes'
else:
    ans = 'No'
print(ans)
n = int(input())
if n%100 == 7:
  print('Yes')
elif (n//10)%10 == 7:
  print('Yes')
elif n//100 == 7:
  print('Yes')
else:
  print('No')
N = input()

if N in "7":
    print("Yes")
else:
   print("No")
import re
# input
n = input()
# judge
if (re.match('.*7.*', n)):
    print("YES")
else:
    print("NO")
a = int(input("数値を入力してください"))
third = a // 100
second = a // 10 - third * 10
first = a - (third *100 +second*10)
if(third == 7 or second == 7 or first == 7):
  print("Yes")
else:
  print("No")
n = input()

flag = False
for i in n :
    print(i)
    if int(i)==7:
        flag=True
        break
    else:
        flag=False
print (flag)
n=int(input())

ans='No'

if n//100==7 or n//10==7 or n%10==7:
    ans='Yes'
print(ans)
import math
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
K = int(input())
 
 
ans = 0
for i in range(K):
    for j in range(K):
        for k in range(K):
           
 
                ans += gcd(i+1,j+1,k+1)
            #1-Kまで
print(ans)
N=input()
if N[0]=='7' or N[1]=='7' or N[2]=='7':
    print("yes")
else:
    print("No")
N = str(input())
if N[0] == 7 or N[1] == 7 or N[2] == 7: 
    print('Yes')
else:
    print("No")
a=int(input())
anser=0
for i in range(a+1):
  if i%3!=0 and i%5!=0:
    anser+=i
print(anser)
import math
from functools import lru_cache


@lru_cache(maxsize=None)
def gcd(a, b):
    return math.gcd(a, b)


K = int(input())

total = 0

for a in range(1, K + 1):
    for b in range(1, K + 1):
        for c in range(1, K + 1):
            total += gcd(gcd(a, b), c)

print(total)
N = int(input())
x = N
while x:
  if x % 10 == 7:
    print('Yes')
  x //= 10
print('No')
n = int(input())
keta1 = int(str(n)[0])
keta2 = int(str(n)[1])
keta3 = int(str(n)[2])
if (keta1 * keta2 * keta3 + 7) // 7 != 0:
  print("No")

else:
  print("Yes")
n=list(str(input()))
if '7' in n:
    print('yes')
else:
    print('No')
import math as mat
N = int(input())
A = int(mat.floor(N/100))
B = int(mat.floor((N-A*100)/10))
C = int(mat.floor(N-A*100-B*10))
if A == 7 or B == 7 or C == 7 :
    ans = str('yes')
else:
    ans = str('no')

print(ans)
A = str(input())
i_count = 0
for i in A:
  if i == int(7):
    i_count = i_count+1

if i_count == 0:
  print("No")
else:
  print("Yes")
i = int(input())
fizz=[]
for x in range(i):
  if x % 3 ==0 and x%5==0:
    continue
  elif x % 3==0:
    continue
  elif x%5==0:
    continue 
  else:
    fizz.append(x)
print(sum(fizz))
a = int(input())
if a-7 % 10 == 0:
  print("Yes")
elif a-70 % 100 < 10:
  print("Yes")
elif a >= 700 and a < 800:
  print("Yes")
else:
  print("No")
n = list(input())
c=0

for i in range(3):
	if n[i]=='7':
		print('Yes')
		c+=1
		break

if c==0:
	print('N0')
N= input()
if ('34' in N):
    print("Yes")
else:
    print("No")
s = int(input())
if s/100==7:
    print("Yes")
elif s/10==7:
    print("Yes")
elif s%100==7:
    print("Yes")
else:
    print('NO')
N = input()
if '7' in str(N):
    print('yes')
else:
    print('no')
n=input()
f=0
for i in n:
  if i=='7':
    print("Yes")
    f=1
    break
if f==0:
  print("NO")
a,b,c = input()
'Yes' if(a=='7' or b=='7' or c=='7') else 'No'
s=list(map(int,input().split()))
if 7 in s:
  print("Yes")
else:
  print("No")
n = input()
if "7" in n:
  print("yes")
else:
  print("no")
N=[input()]
if N.count("7")>=1:
  print("Yes")
else:
  print("No")
a,b,c=input()

if (a==7 or b==7 or c==7):
    print('Yes')
else:
    print('No')
a=input()
if '7' in a:
   print('yes')
else:
   print('no')
a = input()
if a[0]==7 or a[1] == 7 or a[2] == 7:
  print('Yes')
else:
  print('No')
n = int(input())
flag = 1

n_1 = (n-(n//10)*10)
n_10 = (n-(n//100)*100 - n_1)//10
n_100 = (n - n_1 - n_10*10)//100

if(n_1!=7 and n_10!=7 and n_100!=7):
  flag = 0

if flag == 0 :
  print("NO")
else:
  print("YES")
from math import *

N= int(input())

a = floor(N/100)
b=floor((N-a)/10)
c=N%10

if a==7 or b==7 or c==7 :
    print("Yes")
else:
    print("No")
N=int(input())
class Lucky:
    def __init__(self,N):
        self.N=N
        self.N_1=int(N/100)
        self.N_2=int((N - 100*self.N_1)/10)
        self.N_3=int((N-100*self.N_1-10*self.N_2))
        
    def Lucky_7(self):
        if self.N_1==7 or self.N_2==7 or self.N_3==7:
            return print("yes")
        else:
            return print('no')

Lucky(N).Lucky_7()
a = int(input())
nums = [int(d) for d in str(a)]
count = 0
if nums[0] == 7:
  print("Yes")
elif nums[1] ==7:
  print("Yes")
elif nums[2]==7:
  print("Yes")
else:
  print("NO")
n = input()
if n in "7":
    print("Yes")
else:
    print("No")
import math
K=int(input())
sum=0
for i in range(1,K+1):
    for j in range(1,K+1):
        tmp=math.gcd(i,j)
        for l in range(1,K+1):
            sum+=math.gcd(tmp,l)
print(sum)
def lucky_7():

  input_num = input("Enter a number between 100 and 999: " )
  N = int(input_num)

  if  N > 999 or N < 100:
    print("No")

  elif str(N)[-1] == '7':
    print("Yes")
  elif str(N)[-2] == '7':
    print("Yes")
  elif str(N)[-3] == '7':
    print('Yes')
  else:
    print('No')

lucky_7()
import math
ans=0
i = int(input())
for a in range(1,i+1):
  for b in range(1,i+1):
    for c in range(1,i+1):
      n=math.gcd(math.gcd(a,b),c)
      ans+=n
print(ans)
from random import random

print(['Yes', 'No'][random() < 0.5])
a = int(input())


c=0

for i in range(a + 1):
 	if bool(i%3!=0 and i % 5 != 0):
  		c += i
  
print(c)
num = [int(x) for x in input().split()]

for n in num:
    if n == 7:
        print("Yes")
        break
    else:
        print("No")
def main():
    n = int(input())
    for i in range(3):
        if n%10 == 7:
            print("Yes")
            return
        n /= 10
    print("No")

if __name__ == "__main__":
    main()
s= input()
i=0
res=[]
while i< len(s):
  j=s[i:i+1]
  res.append(j)
  i+=1
print('Yes' if str(7) in res else 'NO')
import sys

n = int(input())

n_1 = n % 10
if n_1 == 7:
    print("Yes")
    sys.exit()
    
m = n // 10
n_10 = m % 100
if n_10 / 10 == 7:
    print("Yes")
    sys.exit()

n_100 = n // 100
if n_100 / 100 == 7:
    print("Yes")
    sys.exit()

print("No")
a, b, c = input()  # 1234を整数(int)型ではなく、文字列(str)型で変数に格納する
if(a==7 or b==7 or c==7): print("Yes")
else:print("No")
N = input()
if N[0] == 7 or N[1] == 7 or N[2] == 7:
    print('Yes')
else:
    print('No')
from math import *
r = range(1, int(input()) + 1)
print(sum(gcd(gcd(a, b), c) for a in r for b in r for c in r))
#A
N = input()
#print( N[-1])
N = str(N)

if N[-1]==7 or N[-2]==7 or N[-3]==7:
    print("Yes")
else:
    print("No")
s = input()
if s[0] != 7 and s[1] != 7 and s[2] != 7:
  print('No')
else:
  print('Yes')
N = int(input())
N = str(N)
list_N = list(N)
list_N = [int(s) for s in list_N]
print(list_N)

if(list_N[0] != 7 and list_N[1] != 7 and list_N[2] != 7):
  print("No")
else:
  print("Yes")
N = int(input())
ans=0
for i in range(1,N+1):
    if(not(i%3==0 or i%5==0)):
        ans += i
print(ans)
N = input()
if "7" in N:
    print("yes")
else:
    print("no")
def a(N):
  return 'Yes' if 7 in N else 'No'
n = int(input())
n = str(n)

for i in n:
  if i =='7':
    print('YES')
  else:
    print('NO')
n = int( input() )

while n > 0:
    if n%10 == 7:
        print("YES")
        exit()
    else:
        n = n // 10

print("NO")
param = input()

ret = None
if param in '7':
  ret = 'Yes'
else:
  ret = 'No'
  
print(f'{ret}')
n = int(input())
result = 0

for i in range(1, n + 1):
  if not i % 3 == 0 and not i % 5 == 0:
    result += i
    
print(result)
def main():
    N = int(input())
    flag = False
    for _ in range(3):
        N = N // 10
        if N % 7 == 0:
            flag = True
    if flag:print("Yes")
    else:print("No")

if __name__ == "__main__":
    main()
N = int(input())

count = 0
for i in range (1,N+1):
  if i % 3 == 0 or i % 5 == 0:
    count += i
  print(count)
import math
N = int(input())
v = False
while N != 0:
    i = N - (N // 10) * 10
    v |= (i == 7)
    N //= 10
print(v)
n = list(map(str, input()))
ans = "NO"
for i in range(3):
  if n[i] =="7":
    ans = "YES"
    break
print(ans)
N = int(input())
x=N/100
if (x == 7):
    print('Yes')
    exit()
y=N%100/10
if (y == 7):
    print('Yes')
    exit()
z=N%100%10
if (z == 7):
    print('Yes')
    exit()
print('No')
a,b,c = map(int,input())

if a*b*c%7 == 0 :
  print("Yes")
else: print("No")
n = list(map(int, input().split()))
if 7 in list(n):
    print('Yes')
else:
    print('No')
N=int(input())
C=str(N)
c=0
for i in range(len(C)):
  if C[i]==7:
    c+=1
if c==0:
  print("No")
else:
  print("Yes")
#200412A
N = int(input())
flag = 0
if N%100 ==7:
    flag = 1
n=N//10
if n%10 ==7:
    flag =1
if N//100 ==7:
    flag = 1
if flag ==1:
    print("Yes")
else:
    print("No")
import math
K=int(input())
add=0
for i in range(1,K+1):
    for j in range(1,K+1):
        B=math.gcd(i,j)
        for k in range(1,K+1):
            add += math.gcd(B,k)
           
print(add)
N = list(input(""))

if 7 in N:
    print('Yes')
else:
    print('No')
n = int(input())

a = n // 100
n = n % 100
b = n // 10
n = n % 10
c = n
if a == 7 | b ==7 | c == 7:
    print("Yes")
else:
    print("No")
n = int(input())
ans = 0

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

for i in range(1, n+1):
    for j in range(1, n+1):
        x = gcd(i, j)
        for k in range(1, n+1):
            ans += gcd(x, k)
print(ans)
N = input()
if "7" in "N":
  print("Yes")
else:
  print("No")
def a(N):
    return 'Yes' if 7 in N else 'No'
n=list(input())
if n[0]=='7' or n[1]=='7' or n[2]=='7':
    print("Yes")
else:
    print("NO")
n = int(input())
h = n // 100
d = (n-h)// 10
c = n % 10

if h == 7 or d ==7 or c ==7:
    print("Yes")
else:
    print("No")
def func(N):
  return 'Yes'if 7 in N else 'No'
import math
K=int(input())
sum=0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            sum+=math.gcd(math.gcd(i, j), k)
print(sum)
N = input()
if '7' in N:
    print('Yes')
else:
    print:('No')
n = int(input())
if n% 10 == 7:
    print("Yes")
else:
    print("No")
s=input()
count=0
for i in s:
  if i=="7":
    print("Yes")
    count+=1
  else:
    pass
if count==0:
  print("No")
n = input()
flag = 1

for num in n:
    if int(num) % 7 == 0:
        flag = 0

if flag == 0:
    print("Yes")
else:
    print("No")
xs = input().split(" ")

if "7" in xs:
  print("Yes")
else:
  print("No")
N=input()

"7" in N

if False:
  print("No")
elif True:
  print("Yes")
a = input()
if a[0]==7 or a[1]==7 or a[2] :
  print('Yes')
else:
  print('No')
n = list(input())

for i in n:
    if i == "7":
        print("Yes")
        exit()
    else:
        print("No")
N = 123

s = str(N)
if s.count("7")>0:
	print(True)
else:
	print(False)
n = str(input())
if int(n[0]) and int(n[1]) and int(n[2]) != 7:
    print("No")
else:
    print("Yes")
user_input = input("enter the number: ")
for i in user_input:
    if i == "7":
        print("Yes")
        break
else:
    print ("No")
N=list(input())
ans=False
if N[0]=="7":
    ans=True
if N[1]=="7":
    ans=True
if N[2]=="7":
    ans=True
if ans:
    print("YES")
else:
    print("NO")
N = input()

list = [N[0], N[1], N[2]]
if 7 in list:
  print("Yes")
else:
  print("No")
import math
from functools import reduce
def gcd(x):
    return reduce(math.gcd, x)


a = int(input())
l = []
for i in range(1, a+1):
    for j in range(1, a+1):
        for k in range(1, a+1):
            l.append(gcd([i, j, k]))
print(sum(l))
import sys
N = int(input())

while N > 0:
    if N % 10 == 7:
        print('Yes')
        sys.exit()
    N /= 10
print('No')
def main(N):
    has_seven = False
    for i in range(len(str(N))):
    	if N[i] == '7':
        	has_seven = True
        	break
        
    if has_seven:
    	print("Yes")
    else:
    	print("No")
def main():
    n = str(input())
    if n[0] == '7' or n[1] == 7 or n[2] == '7':
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    main()
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())
sum_ans = 0
for a in range(1, k+1):
    for b in range(1, k+1):
        gcd_ab = gcd(a, b)
        for c in range(1, k+1):
            gcd_abc = gcd(gcd_ab, c)
            sum_ans += gcd_abc
print(sum_ans)
string=input()
if string[0] or string[1] or string[2] in "7":
    print("Yes")
else:
    print("No")
import math
def gcd(a,b,c):
    a = math.gcd(a, b)
    a = math.gcd(a, c)
    return a
ans=0
K=int(input())
for i in range(1,K+1): 
    for j in range(1,K+1):
        for k in range(1, K+1):
            ans+=gcd(i,j,k)
print(ans)
K = int(input())
total = 0

def gdc(x,y):
  if x%y==0:
    return y
  return gdc(y, x%y)

for a in range(K):
  for b in range(K):
    for c in range(K):
      total += gdc(c+1, gdc(b+1, a+1))
print(total)
inputStr = input()

for c in inputStr:
    if c == '7':
        print("YES")
        exit()

print("NO")
s=input()
 
if s[0]==7 or s[1]==7 or s[2]==7:
  print('Yes')
  
else:
  print('No')
a = input()

count = False
for i in range(len(a)):
    if i == "7":
        count = True
        break

if count:
    print("Yes")
else:
    print("No")
import math
K=int(input())
ans=0

for i in range(1,K+1):
    for j in range(1,K+1):
        for k in range(1,K+1):
            ans+=math.gcd(i,math.gcd(j,k))
print(ans)
n = input()

flag = "No"
for i in n :
    print(i)
    if int(i)==7:
        flag="Yes"
        break
    else:
        flag="No"
print (flag)
N=int(input())
if N//100==7 or (N//10)%10==7 or N//10==7 :
  print("Yes")
else :
  print("No")
n = "137"
if "7" in n:
    print("Yes")
else:
    print("No")
N = int(input())

bool_ = 0
while N > 0:
    if N % 10 == 7:
        print('Yes')
        bool_ = 1
        break
    N /= 10

if bool_ != 1:
    print('No')
n = int(input())
k = 0
for i in range(n):
  if not ((i+1)%5)*((i+1)%3) == 0:
    k += i+1
print(k)
A=input()
 
if A in "7":
  print("Yes")
else:
  print("No")
a = input()
if a.count('7') == 0:
  print('Yes')
else:
  print('No')
n=input()
if(n[0]=='7'or n[1]=='7'or[2]=='7'):
    print('Yes')
else:
    print('No')
N = input()
for i in N:
  if i =="7":
    ans = "Yes"
  else:
    ans = "No"
print(ans)
N = [int(x) for x in input().split()]

X = str(N)

if "7" in X:
    print("True")
else:
    print("False")
from functools import lru_cache

K = int(input())
sum = 0

@lru_cache()
def gcd(x,y):
  r = x % y
  while r> 0:
    x = y
    y = r
    r = x%y
  return y
  
for a in range(K):
  for b in range(K):
    for c in range(K):
      sum += gcd(gcd(a+1,b+1),c+1)
print(sum)
N = input()
if '7' in str(N):
    print("yes")
else:
    print("No")
import sys

n = input()
for i in range(3):
  if(n[i] == "7"):
    print('YES')
    sys.exit()

print('NO')
# P3:
def get_gcd(numbers):
    """Helper function to get GCD of list of numbers."""
    import math
    from functools import reduce

    if 1 in numbers:
        return 1

    # gcd is associative
    return reduce(lambda x, y: math.gcd(x, y), numbers)


def sum_of_gcd_tuples():
    K = int(input())
    total = 0
    for a in range(1, K + 1):
        for b in range(1, K + 1):
            for c in range(1, K + 1):
                total += get_gcd([a, b, c])

    print(total)


sum_of_gcd_tuples()
N=input()
n=int(N)
S=0
for i in range(n):
    if (i%3 != 0)and(i% 5 != 0):
      S+=i
print(S)
N = str(input())

for i in range(len(N)):
    if N[i] == "7":
        flag = True
    else:
        flag = False
        
if flag:    
    print("Yes")
else:
    print("No")
n=input()
ans="No"
for i in range(3):
    if n[i]==7:
        ans="Yes"
        break
print(ans)
N = int(input())
count_list = []
for i in range(N + 1):
    if i % 15 == 0:
        count_list.append('FizzBuzz')
    elif i % 3 == 0:
        count_list.append('Fizz')
    elif i % 5 == 0:
        count_list.append('Buzz')
    else:
        count_list.append(i)
int_list = []
for i in count_list:
    try:
        int_list.append(int(i))
    except:
        pass
print(sum(int_list))
num=input()
num=list(num)
if not int(num[0])==7:
  if not int(num[1])==7:
    if not int(num[2])==7:
      print("No")
else:
  print("Yes")
import math
import itertools

def culc_gcd_of_3(l_p):
    answer = 0
    for x in l_p:
        temp = math.gcd(x[0], x[1])
        
        if temp == 1:
            answer += 1
        else:
            answer += math.gcd(x[2], temp)
    
    return answer
 
 
K = int(input())
l_p = list(itertools.product(range(1, K+1), range(1, K+1), range(1, K+1)))
 
print(culc_gcd_of_3(l_p))
N = int(input())
if  N % 10 == 7:
  print("Yes") 
elif  N % 100 == (70 or 71 or 72 or 73 or 74 or 75 or 76 or 77 or 78 or 79):
  print("Yes")
elif  (N - (N % 100)) == 700:
  print("Yes")
else:
  print("No")
a = input()

for i in a:
    if i == "7":
        print("Yes")
        break
    else:
        print("No")
import fractions
K=int(input())
ans=0
for i in range(1,K+1):
    for j in range(1,K+1):
        for k in range(1,K+1):
            a=fractions.gcd(i,j)
            b=fractions.gcd(a,k)
            ans=ans+b
print(ans)
li = list(map(int,input().split()))	
if li.count(7) > 0:
  print('Yes')
else:
  print('No')
N=int(input())
import sys
for i in range(3):
  if N%10==7:
    print ('Yes')
    sys.exit
  N=N//10
print ('No')
num = int(input("num: "))
list = list(str(num))
count = 0

for i in range(3):
  if list[i] == "7":
    print("Yes")
    break
  else:
    count += 1

if count == 3:
  print("No")
else:
  None
N = input()

if N[-1]==7 or N[-2]==7 or N[-3]==7:
    print("Yes")
else:
    print("No")
s=input()

if s[0]==7 or s[1]==7 or s[2]==7:
  print('Yes')
  
else:
  print('No')
a, b, c = input()
'Yes' if(a==7 or b==7 or c==7) else 'No'
N = int(input())

a = N%10
b = (N//10)%10
c = (N//100)%10

print(a, b ,c)

if a==7 or b==7 or c==7:
    print('Yes')
else:
    print('No')
K = int(input())


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


ans = 0
for a in range(K):
    for b in range(K):
        for c in range(K):
            ans += gcd(gcd(a+1, b+1), c+1)

print(ans)
def test(n):
    if '7' in str(n):
        return 'Yes'
    else:
        return 'No'
test(117)
test(123)
test(777)
n=input()
if n[0]==7 or n[1]==7 or n[2]==7:
    print("Yes")
else:
    print("No")
N=input().split()
if '7' in N:
  print('Yes')
else:
  print('No')
N=int(input())
a=str(N)
if 'a' in "7":
  print("Yes")
else:
  print("No")
N = input()
if N in '7':
  print('Yes')
else:
  print('No')
n = input()

if (n in '7'):
  print('Yes')
else:
  print('No')
N = int(input())
print(N)

if N/100==7:
  print('Yes')
elif (N%100)/10==7:
  print('Yes')
elif (N%10)==7:
  print('Yes')
else:
  print('No')
x = '117'
if '7' in x:
    print('Yes')
else:
    print('No')
if '7' in str(input()):
  print('yes')
else:
  print('no')
N = input()
if N[0] == '7' or N[1] == '7' or N[2] == '7':
    print("yes")
else:
    print("No")
a = input()
b=list(a)
res= 0
for i in b:
    if i == '7':
        print("Yes")
        res = res+1

if res == 0:
    print("No")
#pow(a,b,mod)
from math import gcd
from functools import reduce
from itertools import product ##for i in z for j in z -> for i,j, in product(z,z)
k=int(input())
z=range(1,k+1)
print(sum(gcd(i,gcd(j,k)) for i,j,k in product(z,z,z)))
a = input()
if '7' in a:
   print('yes')
else:
   print('no')
# -*- coding: utf-8 -*-

N = int(input())

if 700 <= N < 800:
  print('Yes')
elif 70 <= N%10 < 80:
  print('Yes')
elif N == 7:
  print('Yes')
else:
  print('No')
a=str(input())
for b in a:
  if b == '7':
    print('Yes')
  else:
    print('No')
N = input()
c=True
for i in range(3):
  if N[i]==7:
    c=True
    break
  else:
    c=False
if (c):
  print('Yes')
else:
  print('No')
N = int(input())
s=0
if N/100 == 7:
    print("Yes")
    s+=1
    

N = N % 100 
    

if s==0 and int(N / 10) == 7:
    print("Yes")
    s+=1

N = N % 10 

if s==0 and N / 1 == 7:
    print("Yes")
if s == 0:
    print("No")
n = list(input())
for i in n:
  if str(i) == 7:
    print('Yes')
    exit()
print('No')
a,b,c= input()
if a ==7 or b==7 or c ==7:
  print('Yes')
else:
  print('No')
n=int(input())
flag=0
while (n!=0):
    if((n%10)==7):
        print('Yes')
        flag+=1
        break
    else:
        n=n/10
if(flag==0):
    print('No')
from functools import reduce
import math

num = int(input())
a = 1
sum = 0

def gcd(*numbers):
  return reduce(math.gcd, numbers)

def loopC(a, b, num):
  c = 1
  sum = 0
  while c <= num:
      ans = gcd(a, b, c)
      # print(a, b, c, ans)
      sum += ans
      c += 1
  return sum

def loopB(a, num):
  b = 1
  sum = 0
  while b <= num:
    ans = loopC(a, b, num)
    b += 1
    sum += ans
  return sum

while a <= num:
  ans = loopB(a, num)
  sum += ans
  a += 1

print(sum)
N=int(input())

M=N-7
if M%10==0:
  print("Yes")
else:
  M=N//10-7
  if M%10==0:
    print("Yes")
  else:
    M=N//100-7
    if M%10==0:
      print("Yes")
    else:
    	print("NO")
def find_7(num):
	num_list = list(str(num))
	for x in num_list:
		if x == '7':
			ans = "Yes"
			break
		else:
			ans = "No"

	return ans

if __name__ == '__main__':
	print (find_7(777))
import sys

N = list(input())

for i in range(3):
  if ( N[i] == 7):
    print('yes')
    sys.exit()
print('No')
N = map(int,input().split())
strN = str(N)

if strN.count("7") > 0:
    print("Yes")
else:
    print("No")
N = int(input())

if N/100==7:
  print('Yes')
elif (N%100)/10==7:
  print('Yes')
elif (N%10)==7:
  print('Yes')
else:
  print('No')
N = int(input())
h = N % 100
t = (N - 100*h) % 10
o = N - 100*h - 10*t
if h == 7:
    print('Yes')
elif t == 7:
    print('Yes')
elif o == 7:
    print('Yes')
else:
    print('No')
# -*- coding: utf-8 -*-
a = int(input())
if a % 10 == 7 or a // 10 % 10 == 7 or a // 100 % 10 == 7:
	print("YES")
else:
	print("NO")
N=int(input())
n=list()
m=list()
for i in range(N):
    if(i%3==0 or i%5==0):
        n.append(i)
    else:
        m.append(i)
print(sum(m))
n = input()
 
if n in "7":
  print("Yes")
else:
  print("No")
n=int(input())
if n/100==7:
  print("Yes")
else:
  print("No")