peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N = int(input())
import math
x = math.floor(N**0.5)
print(x**2)
# Judge status: Accepted
import math

k = int(input())

tb = [
    [math.gcd(a, b) for a in range(0, 201)]
    for b in range(0, 201)
]

x = 0
for a in range(1, k + 1):
    for b in range(1, k + 1):
        t = tb[a][b]
        for c in range(1, k + 1):
            x += tb[t][c]
print(x)
# Judge status: Wrong Answer
n, m = map(int, input().split())
for i in range(m):
  print(i+1, 2*m+1-i)
# Judge status: Wrong Answer
N,K = map(int, input().split())
print((N//K)-N%K)
# Judge status: Wrong Answer
from bisect import bisect_left
from numpy import cumsum

N = int(input())
A = list(map(int, input().split()))
a_cum = cumsum(A)

ind = bisect_left(a_cum, a_cum[-1]/2)
print(abs((a_cum[-1] - a_cum[ind]) - a_cum[ind]))
# Judge status: Wrong Answer
def resolve():
    '''
    code here
    '''
    import collections
    N, M = [int(item) for item in input().split()]
    Xs = [int(item) for item in input().split()]
    if N < M:
        Xs.sort()
        ds = [Xs[i] - Xs[i-1] for i in range(1, M)]
        ds.sort()
        # print(ds)
        print(sum(ds[:-1*(N-1)]))
    else:
        print(0)


if __name__ == "__main__":
    resolve()
# Judge status: Wrong Answer
h=int(input())

out=0
c=0

while h>1:
    h=h//2 if h%2==0 else (h+1)//2
    out+=2**c
    c+=1

out+=2**c if h!=1 else 0

print(out)
# Judge status: Accepted
import numpy as np

N=int(input())

S=[]
count_S={}
for i in range(N):
    s=input()
    S.append(s)
    count_S[s]=0

for key in S:
    count_S[key]+=1

keys=np.array(list(count_S.keys()))
values=np.array(list(count_S.values()),dtype=np.int32)
out=np.where(values==np.max(values))
result=np.sort(keys[out])

for r in result:
    print(r)
# Judge status: Wrong Answer
import math

N = int(input())
A = list(map(int, input().split()))
# print(N, A)

for i in range(len(A)):
    A[i] -= (i + 1)
# print(A)

_A = list(map(abs, A))

average = math.floor(sum(_A) / len(_A))

for i in range(len(A)):
    A[i] = abs(A[i] - average)

sadness = sum(A)

print(sadness)
# Judge status: Wrong Answer
n = int(input())
l = list(map(int, input().split()))

l1 = list()
for i in range(1, n):
    if l[i] > l[i-1]:
        l1.append(1)
    elif l[i] == l[i-1]:
        l1.append(0)
    else:
        l1.append(-1)

ans = 0
i = 1
while i <= n-2:
    if l1[i]*l1[i-1] == -1:
        ans += 1
        i += 2
    else:
        i += 1

print(ans + 1)
# Judge status: Accepted
import sys

def resolve():
    N = int(input())
    S = list(map(int, input().split(" ")))
    S.sort(reverse=True)
    print(sum(S[0::2]) - sum(S[1::2]))


if '__main__' == __name__:
    resolve()
# Judge status: Wrong Answer
X = int(input())
testing_number = X + 1
while(True) :
    is_prime = True
    while(True) :
        for i in range(2,testing_number) :
            if (testing_number % i == 0) :
                is_prime = False
                testing_number += 1
                break
        break

    if(is_prime) :
        break

print(testing_number)
# Judge status: Wrong Answer
a,b,c,d = map(int,input().split())
if(a+b>(c+d)):	print("Yes")
else:	print("No")
# Judge status: Accepted
N = int(input())
S = ['0'] * N
for i in range(N):
    S[i] = input()
import collections
c = collections.Counter(S)
li = list(c.values())
ca = list(c.keys())
li.sort()
max = li[-1]
lia = []
for i in ca:
    if c[i] == max:
        lia.append(i)
lia.sort()
n = len(lia)
for i in range(n):
    print(lia[i])
# Judge status: Accepted
S = input()
if S[-1] == 's':
    print(S + 'es')
else:
    print(S + 's')
# Judge status: Wrong Answer
x = int(input())
place = 0
i = 1

while 1:
    if place + i == x:
        print(i)
        exit()
    elif (i + i+1) > (x - place):
        i += 1
    else:
        place += i
        i += 1
# Judge status: Wrong Answer
import sys


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


N, M = LI()
ans = [-1]*N
for _ in range(M):
    a, b = LI()
    if ans[a-1] == b or ans[a-1] == -1:
        ans[a-1] = b
    else:
        print(-1)
        sys.exit()
if ans[0] == -1:
    ans[0] = 1
S = ""
for i in range(N):
    if ans[i] == -1:
        ans[i] = 0
    S += str(ans[i])
if S == "0"*N:
    S = -1
print(S)
# Judge status: Accepted
sx,sy,tx,ty=map(int,input().split())
ans=""
ans+="R"*(tx-sx)
ans+="U"*(ty-sy)
ans+="L"*(tx-sx)
ans+="D"*(ty-sy+1)
ans+="R"*(tx-sx+1)
ans+="U"*(ty-sy+1)
ans+="LU"
ans+="L"*(tx-sx+1)
ans+="D"*(ty-sy+1)
ans+="R"
print(ans)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if a==b==c:
    print(3)
elif a==b or a==c or b==c:
    print(2)
else:
    print(1)
# Judge status: Wrong Answer
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

def solve():
    A,B,C,K = map(int, input().split())

    x = ((-1)**(K%2))*(A- B)*max(1,(2*(K//4)))

    if(x>1e18):
        print("Unfair")

    print(x)
if __name__ == '__main__':
    solve()
# Judge status: Accepted
import collections

N = int(input())
A = list(map(int, input().split()))
diff = [0]*N
summ = [0]*N
count = 0
for i in range(N):
    diff[i] = i - A[i]
    summ[i] = A[i] + i

c_diff = collections.Counter(diff)
c_summ = collections.Counter(summ)
for k in c_diff.keys():
    count = count + c_diff[k]*c_summ[k]
print(count)
# Judge status: Accepted
alpha=[chr(ord('a') + i) for i in range(26)]
a=list(input())
N=int(input())
for i in range(len(a)):
   s=26-alpha.index(a[i])
   if s<=N and s!=26:
      a[i]="a"
      N-=s
s=alpha.index(a[-1])
s=(s+N)%26
a[-1]=alpha[s]
print(*a,sep="")
# Judge status: Accepted
import sys

C1 = input()
C2 = input()[::-1]


for i in range(len(C1)):
  if C1 != C2:
    print("NO")
    sys.exit()

print("YES")
# Judge status: Wrong Answer
import re
word = input()
substring = input()
word = word.replace('?','.')
N = len(word) - len(substring)
found = False
for i in range(N+1):
    regexp = re.compile(word[i:i+len(substring)])
    if regexp.search(substring):
        found = True
        res = word[0:i] + substring
        print(res.replace('.','a'))

if found == False:
    print('UNRESTORABLE')
# Judge status: Wrong Answer
n, m = list(map(int, input().split()))
xy = [list(map(int, input().split())) for i in range(m)]

ans = [1] * (n)
ans[0] = 1
ball = {0}
for i in range(m):
    x, y = xy[i]
    if (x - 1) in ball:
        ans[y-1] += 1
        ans[x-1] -= 1
        ball.add(y - 1)

cnt = 0
for i in list(ball):
  if ans[i] > 0:
    cnt += 1
print(cnt)
# Judge status: Wrong Answer
X = int(input())
if 30 < X:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a = input()
# print(a.split())
b = a.split()
if(int(b[0])+int(b[1])+int(b[2])) >= 22:
    print("bust")
else :
    print("win")
# Judge status: Wrong Answer
n = int(input())
a = [[0,0] for _ in range(n)]
#print(a)
for i in range(n):
    a[i][0],a[i][1]=map(int,input().split())
a.sort()
for i in range(n):
    a[i][0],a[i][1]=(a[i][0]-a[i][1]),(a[i][0]+a[i][1])

now = 0
for i in range(n-1):
    if a[now][1]>a[now+1][0]:
        a.pop(now+1)
    else:
        now+=1
print(len(a))
# Judge status: Wrong Answer
a = int(input())
b = int(input())
h = int(input())

s = (a+b)*h/2

print(s)
# Judge status: Accepted
import numpy as np


N = int(input())
X = []
L = []
for _ in range(N):
    Xi, Li = map(int, input().split())
    X.append(Xi)
    L.append(Li)

begins = []
ends = []
for i in range(N):
    begins.append(X[i] - L[i])
    ends.append(X[i] + L[i])

b = []
e = []
for i in np.argsort(ends):
    b.append(begins[i])
    e.append(ends[i])
begins = b
ends = e

now = -1e9
cnt = 0
for i in range(N):
    if now <= begins[i]:
        cnt += 1
        now = ends[i]

print(cnt)
# Judge status: Accepted
A,B,C,D = map(int,input().split())

if B<=C or A>=D:
  print(0)
elif A<=C and B>=C and D>=B:
  print(B-C)
elif A>=C and B<=D:
  print(B-A)
elif A<=C and B>=D:
  print(D-C)
elif A>=C and A<=D and B>=D:
  print(D-A)
# Judge status: Wrong Answer
n, m = map(int,input().split())

if n == 1 or m == 1:
    print(max(max(n,m)-2,0))
else:
    print((n-2)*(m-2))
# Judge status: Accepted
N,K = [int(x.strip()) for x in input().split()]

L = [True] * N
for i in range(K):
    d = input()
    l = [int(a.strip()) for a in input().split()]
    for a in l:
        L[a-1] = False

ans = sum(v==True for v in L)
print(ans)
# Judge status: Accepted
def main():
    N = int(input())
    A = [0] * N
    B = [0] * N
    for i in range(N):
        A[i], B[i] = map(int, input().split())
    A.sort()
    B.sort()
    if N % 2 == 0:
        mn = A[N//2-1] + A[N//2]
        mx = B[N//2-1] + B[N//2]
    else:
        mn = A[N//2]
        mx = B[N//2]
    ans = (mx-mn) + 1
    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Accepted
N=int(input())
A=list(map(int, input().split()))

L=[0]*(10**6)
for i in range(N):
    if i-A[i]>=0:
        L[i-A[i]]+=1
ans=0
for i in range(N):
    tall=A[i]
    if tall+i<len(L):
        ans+=L[tall+i]
print(ans)
#print(L[:10])
# Judge status: Accepted
K = int(input())
A, B = map(int, input().split(' '))

if B // K * K >= A:
    print('OK')
else:
    print('NG')
# Judge status: Wrong Answer
import math
     
s = input().split()

s[1] = s[1].replace(".", "")
     
num = int(s[0]) * int(s[1])
     
print(math.floor(num/100))
# Judge status: Wrong Answer
X,Y,A,B,C = list(map(int,input().split()))
p = sorted(list(map(int,input().split())),key=lambda x:-x)
q = sorted(list(map(int,input().split())),key=lambda x:-x)
r = sorted(list(map(int,input().split())))

pq = sorted(p[:X] + q[:Y])
print(pq,r)
for i in range(min(X+Y,C)):
  if r[i] < pq[i]:
    break
else:
  i+=1
print(i)
print(sum(r[:i] + pq[i:]))
# Judge status: Wrong Answer
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n,m = i2()
l = []
r = []

for i in range(m):
	L,R = i2()
	l.append(L)
	r.append(R)

print(min(r) - max(l) + 1)
# Judge status: Wrong Answer
n,m,X,Y = map(int,input().split())
x = max(list(map(int,input().split())))
y = min(list(map(int,input().split())))
if X<x<=y<=Y:print('No War')
else:print('War')
# Judge status: Wrong Answer
a,b=map(int,input().split())
S=max(a,b)
T=min(a,b)
A=[T for z in range(S)]
print(*A)
# Judge status: Accepted
S = input()
T = input()
print("Yes" if S == T[:-1] else "No")
# Judge status: Accepted
S = input()
T = input()

if T[:-1] == S:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a,b,c = map(int,input().split())
n = int(input())
m = max(a,b,c)
def bai(x):
  return 2*x

for i in range(n):
  m = bai(m)

print(m-max(a,b,c) +a+b+c)
# Judge status: Accepted
A,B,C,X,Y=map(int,input().split())
print(min(A*X+B*Y,C*2*Y+A*max(0,X-Y),C*2*X+B*max(0,Y-X)))
# Judge status: Accepted
a, b, c, d = map(int, input().split())
if abs(b - a) <= d and abs(c - b) <= d or abs(c - a) <= d:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n = int(input())
ab = []

for i in range(n):
    a,b = map(int,input().split())
    ab.append([b,a])
ab.sort()

due = 0
time = 0
for i in range(n):
    due = ab[i][0]
    time += ab[i][1]
    
    if time > due:
        print("No")
        exit()
print("Yes")
# Judge status: Accepted
k = int(input())
a = []
a.append(7 % k)

for i in range(k):
    a.append((a[i] * 10 + 7) % k)

for i in range(k):
    if a[i] == 0:
        print(i + 1)
        exit()

print(-1)
# Judge status: Accepted
numerosStr = input().split(" ")
numeros=[]
for i in numerosStr:
    numeros.append(int(i))

if numeros[1]/numeros[0] > numeros[2]:
    print(int(numeros[2]))
else:
    print(int(numeros[1]/numeros[0]))
# Judge status: Accepted
# coding: utf-8
# Your code here!

N = int(input())
A = list(map(int, input().rstrip().split()))

m = 0
t = 1
for i in range(61):
    count = 0
    for j in range(N):
        count += A[j] % 2
        A[j] //= 2
    m += ((t * (N - count)) % int(1e9+7)) * count % int(1e9+7)
    m %= int(1e9+7)
    t *= 2
    t %= int(1e9+7)
    
print(m)
# Judge status: Accepted
h=int(input())

ans = 0

while(h):
    ans *= 2
    h//=2
    ans+=1
print(ans)
# Judge status: Accepted
k = int(input())
a,b = map(int,input().split())
ans = "NG"
for i in range(a,b+1):
    if not i%k :
        ans = "OK"
        break
print(ans)
# Judge status: Accepted
X = int(input())

X_half = X // 2
max_ans = 1
tmp_max = 0

for i in range(1,X_half+10):
    for j in range(2,X_half+10):
        tmp = i ** j
        if tmp<=X:
            tmp_max = tmp
    max_ans = max(max_ans, tmp_max)

print(max_ans)
# Judge status: Accepted
x = int(input())
for i in range(300):
  for j in range(-300,300):
    if i >= j:
      a = i**5 - j**5
      if a == x:
        b = i
        c = j
print(b, c)
# Judge status: Accepted
import sys
N, Q = map(int, sys.stdin.readline().rstrip().split(" "))

S = sys.stdin.readline().rstrip()

cs = [0] * (N+1)

for i in range(1, N):
    if S[i - 1] == "A" and S[i] == "C":
        cs[i + 1] = cs[i] + 1
    else:
        cs[i + 1] = cs[i]

for _ in range(Q):
    l, r = map(int, sys.stdin.readline().rstrip().split())
    print(cs[r] - cs[l])
# Judge status: Accepted
N,x = map(int,input().split())
a = sorted(map(int,input().split()),reverse=False)
ans = 0

if x > sum(a):
    print(N - 1)

else:
    for i in a:
        x -= i
        if x >= 0:
            ans += 1
    print(ans)
# Judge status: Accepted
from collections import Counter
N, K = map(int, input().split())
A = list(map(int, input().split()))

ca = Counter(A)
ca = sorted(ca.items(), key=lambda x:x[1], reverse=True)

ans = 0
for i in range(min(K, len(ca))):
    ans += ca[i][1]

print(N-ans)
# Judge status: Wrong Answer
s = input()
q = int(input())

x = []
y = []
cnt = 0

for i in range(q):
    a = list(input().split())
    if a[0] == "1":
        x, y = y, x
        cnt += 1
    else:
        if a[1] == "1":
            x.append(a[2])
        else:
            y.append(a[2])

if cnt % 2 == 1:
    s = s[::-1]

print(''.join(x[::-1]) + s + ''.join(y))

print(s)
# Judge status: Accepted
N,M = map(int,input().split())
if N >= M:
    for i in range(N):
        print(M,end="")
else:
    for i in range(M):
        print(N,end="")
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int, input().split()))
d = {}
for a in A:
  d[a] = d.get(a, 0) + 1
X = sorted(d.values(), reverse = True)
if len(X) <= K:
  print(0)
else:
  ans = N
  for i in range(K):
    ans -= X[i]
  print(ans)
# Judge status: Accepted
N, M = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]
CD = [list(map(int, input().split())) for _ in range(M)]

for ab in AB:
    a = ab[0]
    b = ab[1]

    mr = 10 ** 9
    cp = 1

    for i, cd in enumerate(CD, 1):
        c = cd[0]
        d = cd[1]

        l = abs(a-c) + abs(b-d)

        if l < mr:
            mr = l
            cp = i

    print(cp)
# Judge status: Accepted
k, x = map(int, input().split())
l = [x]
for i in range(1, k):
    l.append(x + i)
    l.append(x - i)
l.sort()
l1 = [str(a) for a in l]
l2 = ' '.join(l1)
print(l2)
# Judge status: Accepted
n, m=map(int, input().split())
print(int(n*(n-1)/2 + m*(m-1)/2))
# Judge status: Wrong Answer
import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
A = [int(x) for x in readline().split()]
B = [int(x) for x in readline().split()]

Acum = list(itertools.accumulate(A))
Bcum = list(itertools.accumulate(B))
print(Acum)
print(Bcum)
ans = 0
for i in range(N):
    if i - 1 >= 0:
        ans = max(ans, Acum[i] + Bcum[-1] - Bcum[i - 1])
    else:
        ans = max(ans, Acum[i] + Bcum[-1])
print(ans)
# Judge status: Wrong Answer
N, D = map(int, input().split(" "))
count = 0
for i in range(1, N+1):
  X, Y = map(int, input().split(" "))
  if X^2 + Y^2 <= D^2:
    count += 1
print(count)
# Judge status: Accepted
n, d = map(int, input().split())
x = [[int(i) for i in input().split()] for _ in range(n)]
c = 0
for i in range(n - 1):
    for j in range(i + 1, n):
        s = 0
        for k in range(d):
            s += (x[i][k] - x[j][k]) ** 2
        s = s ** 0.5
        if s == int(s):
            c += 1
print(c)
# Judge status: Accepted
s=str(input())
l=len(s)
cnt1=0
cnt2=0
for i in range(l):
  if i%2==0:
    if s[i]=='0':
      cnt1+=1
    else:
      cnt2+=1
  else:
    if s[i]=='0':
      cnt2+=1
    else:
      cnt1+=1
print(min(cnt1,cnt2))
# Judge status: Accepted
a,b,c=map(int,input().split())
m=max(a,b,c)
n=m-a+m-b+m-c
if n%2==1:print(n//2+2)
else:print(n//2)
# Judge status: Accepted
def digit_transform(N):
    if N == 0:  return "0"
    ans = ""
    while(N != 0):
        if N % -2 == 0:
            ans = "0" + ans
        else:
            ans = "1" + ans
            N -= 1
        N /= -2
    return ans

print(int(digit_transform(int(input()))))
# Judge status: Wrong Answer
s=int(input())
n=0
while(s>0):
  n=n+s
  s=s-1
n
# Judge status: Accepted
n = int(input())
*A, = map(int, input().split())

C = {a:0 for a in A}

for a in A:
    C[a] += 1

maxA = max(A)

D = {a:0 for a in A}

for a in A:
    t = 2
    while a*t <= maxA:
        D[a*t] = 1
        t = t+1

counter = 0
for a in A:
    if C[a] == 1 and D[a] == 0:
        counter += 1
        
print(counter)
# Judge status: Wrong Answer
n = input()
k = input()
x = input()
y = input()

if n<k:
    print(int(n)*int(x))
else:
    m = int(n)-int(k)
    print(int(k)*int(x)+int(m)*int(y))
# Judge status: Wrong Answer
n, m = map(int, input().split())
ll0 = list(map(int, input().split()))
lt = ll0[1:]
ll = [list(map(int, input().split())) for _ in range(n-1)]
for l in ll:
    for i in lt:
        if  i in l[1:]:
            pass
        else:
            lt.remove(i)
print(len(lt))
# Judge status: Wrong Answer
n,m = map(int, input().split())
a = sorted(list(map(int,input().split())))
bc = [list(map(int, input().split())) for _ in range(m)]
bc.sort(key=lambda x: x[1], reverse=True )

count = 0
for b,c in bc:
    for i in range(b):
        if i == n or a[i] >= c:
            break

        a[i] = c
        count += 1

print(sum(a))
# Judge status: Accepted
N=list(str(input()))
ans=0
if len(N)==1:
    print(int(N[0]))
    exit()
for i in range(1,len(N)):
    if N[i]!='9':
        ans+=int(N[0])-1
        ans+=(len(N)-1)*9
        print(ans)
        exit()
for i in range(len(N)):
    ans+=int(N[i])
print(ans)
# Judge status: Accepted
a,b=map(int, input().split())
t=a+b
if a+b>23:
  print(a+b-24)
else:
  print(a+b)
# Judge status: Wrong Answer
N = int(input())
ans = 0
for i in range(1,N+1):
  tmp = N // i
  ans += ((tmp*i + i) * tmp)/2
print(int(ans))
# Judge status: Wrong Answer
N=int(input())
A=list(map(int,input().split()))
l=[0]*N
for i in range(N-1):
    if 0<A[i]-A[i+1]:l[i]=2
    elif A[i]-A[i+1]<0:l[i]=1
if A[-2]-A[-1]<0:l[-1]=2
m=1000
r=0
for i in range(N):
    if l[i]==1:
        r=m//A[i]
        m-=r*A[i]
    if l[i]==2:
        m+=r*A[i]
        r=0
print(m)
# Judge status: Accepted
w, a, b = map(int, input().split())
if b + w < a: print(a-(b+w))
elif a + w < b: print(b-(a+w))
else: print(0)
# Judge status: Accepted
N = int(input())
A = [int(input()) for _ in range(N)]
sorted_a = sorted(A, reverse=True)

for a in A:
    if a == sorted_a[0]:
        print(sorted_a[1])
    else:
        print(sorted_a[0])
# Judge status: Wrong Answer
import fractions
import functools
import copy
def gcd_list(num_list):
    return functools.reduce(fractions.gcd, num_list)


N = int(input())
A = list(map(int, input().split()))
A.sort()
A1 = copy.deepcopy(A)
A2 = copy.deepcopy(A)
A1.pop(0)
A2.pop(1)
print(max(gcd_list(A1), gcd_list(A2)))
# Judge status: Accepted
import numpy as np
n,k = map(int,input().split())
p = list(map(int,input().split()))
cs = []
for x in p:
    cs.append(((x+1)*x//2)/x)
cs = [0]+np.cumsum(cs).tolist()
ans = 0
for i in range(k, n+1):
    ans = max(ans, cs[i]-cs[i-k])
print(ans)
# Judge status: Accepted
input()
from collections import Counter
aa = list(map(int, input().split()))
dic = Counter(aa)

total = 0
for v in dic.values():
    total += v * (v-1) / 2

for a in aa:
    print(int(total - dic[a] + 1))
# Judge status: Wrong Answer
n,m = map(int,input().split())
h = list(map(int,input().split()))
judge = [True] * n

for i in range(m):
    a,b = map(int,input().split())
    if h[a-1] > h[b-1]:
        judge[b-1] = False
    else:
        judge[a-1] = False

print(judge.count(True))
# Judge status: Accepted
X = int(input())
print(1 if X > 2000 or (X//100)*100 <= X <= (X//100)*105 else 0)
# Judge status: Accepted
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
###############################################################################\
n,k,q=INPUT()
A=[0]*(n+1)
for i in range(q):
    x=int(input())
    A[x]+=1
for i in range(1,n+1):
    if k-q+A[i]>0:
        print("Yes")
    else:
        print("No")
# Judge status: Wrong Answer
K = int(input())
A, B = map(int, input().split())
print('OK' if B-A>=K-1 else 'NG')
# Judge status: Wrong Answer
import sys

n, k = map(int, input().split())
ara = list( map(int, input().split()) )

now = 0
vis = []
taken = [0]*n

while taken[now] == 0:
	vis.append(now)
	taken[now] = 1
	now = ara[now]-1

cycleLen = len(vis) - vis.index(now)

if k < vis.index(now):
	print(vis[k])
	sys.exit()

k -= vis.index(now)

k %= cycleLen

print(vis[k + vis.index(now) ] + 1)
# Judge status: Wrong Answer
L,R,d=[int(x) for x in input().split(" ")]
print(R//d - L//d)
# Judge status: Accepted
from math import ceil


def main():
    target = int(input())
    print(2 * int(target / 11) + ceil((target % 11) / 6))


if __name__ == '__main__':
    main()
# Judge status: Accepted
# AGC 015: A – A+...+B Problem
N, A, B = [int(s) for s in input().split()]

if A > B or (N == 1 and A != B):
    print(0)
elif A == B or B - A == 1:
    print(1)
else:
    print(B * (N - 2) - A * (N - 2) + 1)
# Judge status: Accepted
a, b = map(int, input().split())
ans = -1
for i in range(1, 4):
  if a * i % b != 0:
    ans = a * i
print(ans)
# Judge status: Accepted
x=input()
cnt=0
ans=0
for s in x:
    if s=="T":
        cnt-=1
    else:
        cnt+=1
    if cnt<0:
        ans+=1
        cnt=0
print(ans+cnt)
# Judge status: Accepted
N = int(input())
s = input()
t = input()
k = 0
for i in range(N+1):
    if s[-i:] == t[:i]:
        k = i
print(2*N-k)
# Judge status: Accepted
a, b, c = map(int, input().split())
s = str(a) + str(b) + str(c)
if s == "557":
  print("YES")
elif s == "575":
  print("YES")
elif s == "755":
  print("YES")
else:
  print("NO")
# Judge status: Accepted
s=input()
t=input()
c=0
for i in range(len(s)):
  if s[i]!=t[i]:
    c=1
    break
if c==0:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
# AtCoder
s = sorted(input())
t = sorted(input())
sr = sorted(s, reverse=True)
tr = sorted(t, reverse=True)

ans = 'No'
if (s[0] < t[0]) or (sr[0] < t[0]) or (s[0] < tr[0]) or (sr[0] < tr[0]):
    if len(s) < len(t):
        ans = 'Yes'

print(ans)
# Judge status: Accepted
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
s = S()
n = len(s)
ans = 0
for i in range(1, n+1):
    temp_s = s[0:n-i]
    temp_n = len(temp_s)
    if temp_s[0:temp_n//2] == temp_s[temp_n//2:]:
        ans = temp_n
        break
print(ans)
# Judge status: Wrong Answer
import sys
N,A,B = map(int,input().split())
if (A-B) % 2 == 0:
  print((A-B)//2)
  sys.exit(0)
else:
  if A == 1 or B == 1:
    print(B-A)
  else:
    print(B-A+1)
# Judge status: Wrong Answer
import random
name = list(input())
print(name[random.randint(0,len(name)-1)],end="")
print(name[random.randint(0,len(name)-1)],end="")
print(name[random.randint(0,len(name))])
# Judge status: Wrong Answer
# Hello World program in Python
from collections import Counter as cn

d = int (input())
l = []
for k in range(d):
  r = input()
  p = cn(r)
  l.append(p)

oi = l[0]

for g in range(1,d):
    oi = oi & l[g]
    print(oi)
    
print("".join(sorted(oi.elements())))
# Judge status: Wrong Answer
X = input()

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