peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
a = input()
b = input()
# 最初の文字と最後の文字を入れ替えても同じになればYES
if a[0] == b[2] and a[1] == b[1] and a[2] == b[0]:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
n, m = map(int, input().split())
print((n * 2 + m) // 4)
# Judge status: Accepted
n = int(input())

prime = list()

i = 2
while i * i <= n:
  if n % i == 0:
    cnt = 0
    while n % i == 0:
      cnt += 1
      n //= i
    prime.append(cnt)
  i += 1
  
if n != 1:
  prime.append(1)
  
ans = 0
for x in prime:
  a = 1
  while a * (a+1) // 2 <= x:
    a += 1
  ans += a-1
  
print(ans)
# Judge status: Wrong Answer
H, A = map(int, input().split(" "))

print(H//A+1)
# Judge status: Accepted
a,b=map(int, input().split())

delta=abs(a-b)
if delta%2==1:
  print('IMPOSSIBLE')
else:
  print(min(a,b)+ delta//2)
# Judge status: Accepted
K = int(input())
num = 7%K
ans = -1
for i in range(K):
    if num%K == 0:
        ans = i+1
        break
    num = (num*10 +7)%K
print(ans)
# Judge status: Wrong Answer
N = int(input())
ans = 0
now = - float('inf')
for _ in range(N):
    a = int(input())
    if a < now:
        ans += 1
    now = a

print(ans)
# Judge status: Wrong Answer
# S = list(input().split())
# a = int(S[0])
# b = S[1].replace('.', '')
# B = int(b)
#
# ans = (a * B) // 100
# print(ans)

a, b = input().split()
A = int(a)
b = b.replace('.', '')
B = int(b)
ans = (A * B) // 100
print(ans)
# Judge status: Accepted
a, b = map(int, input().split())
s = input()
flag = True
if (s[a] != '-'): flag = False
for i in range(a + b - 1):
    if (i == a): pass
    elif s[i] == '-': flag = False
print('Yes') if flag else print('No')
# Judge status: Wrong Answer
N,M = map(int,input().rstrip().split(" "))
ans = [False for _ in range(N + 1)]
balls = [1 for _ in range(N + 1)]
ans[1] = True
for i in range(M):
  q = list(map(int,input().rstrip().split(" ")))
  if ans[q[0]] == True:
    ans[q[1]] = True
  balls[q[0]] -= 1
  balls[q[1]] += 1
ansi = 0
for i in range(N):
  if ans[i] and balls[i] >= 0: ansi += 1
print(ansi)
# Judge status: Accepted
import math

a, b, h, m = map(int, input().split())

ang_a = (h+m/60)/12
ang_b = m/60
ang = ang_a - ang_b if ang_a - ang_b <= 0.5 else ang_b - ang_a
theta = ang * 2 * math.pi
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(theta)))
# Judge status: Accepted
def main():
    N = int(input())
    ans = 0

    for num in range(1, N + 1, 2):
        cnt = 0
        for i in range(1, num + 1, 2):
            if num % i == 0:
                cnt += 1
        if cnt == 8:
            ans += 1

    print(ans)


if __name__ == "__main__":
    main()
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
B = [0]*Q
C = [0]*Q

num = [0]*100000

for i in range(N):
    num[A[i]-1] += 1

sum = sum(A)

for i in range(Q):
    B[i], C[i] = map(int, input().split())
    
    sum += (C[i]-B[i])*num[B[i]-1]
    num[C[i]-1] += num[B[i]-1] 
    num[B[i]-1] = 0

    print(sum)
# Judge status: Accepted
N = int(input())
T, A = map(int, input().split())
lis = list(map(int, input().split()))

def calc_tem(H):
    return abs(A - ((T*1000) - (H*6)) / 1000)

new_lis = list(map(calc_tem, lis))
ans = new_lis.index(min(new_lis)) + 1

print(ans)
# Judge status: Accepted
S=input()
T=input()
if S==T[:-1]:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
A,B,C,K = map(int,input().split())
a = A ** 2*(K + 1)
b = B ** 2*(K + 1) 
c = C ** 2*(K + 1)
if (abs(a - b) > 10**18):
  print("Unfair")
else:
  print(str(a - b))
# Judge status: Wrong Answer
N=int(input())
M=10**9+7
ans=1
m=1
for i in range(N):ans=(ans*10)%M
for i in range(N):m=(m*9)%M
ans-=(m*2)%M
m=1
for i in range(N):m=(m*8)%M
print(ans+m)
# Judge status: Accepted
x=int(input())

m=100
cnt=0
while m<x:
  cnt+=1
  m=m+int(m*0.01)
print(cnt)
# Judge status: Accepted
from collections import Counter

n = int(input())
a = list(map(int, input().split()))
d = Counter(a)
ans = -1

for k in sorted(d.keys())[::-1]:
    if ans == -1 and d[k] >= 4:
        print(k*k)
        exit()
    elif ans == -1 and d[k] >= 2:
        ans = k
    elif ans != -1 and d[k] >= 2:
        print(ans*k)
        exit()

print(0)
# Judge status: Wrong Answer
a,b = map(int,input().split())
print(a%b)
# Judge status: Wrong Answer
from fractions import gcd
A, B, C, D = map(int, input().split())
sc = B//C - (A-1)//C
sd = B//D - (A-1)//D
scd = B//gcd(C, D) - (A-1)//gcd(C, D)
print(sc, sd, scd, B-A+1)
print(B-A+1 - sc - sd + scd)
# Judge status: Accepted
import sys

def f(n):
    if n & 1:
        return n * 3 + 1
    else:
        return n // 2

s = int(sys.stdin.readline().rstrip())

def main():
    a = s
    res = set([a])
    for i in range(2, 10**6+1):
        a = f(a)
        if a in res:
            return i 
        res.add(a)

if __name__ == '__main__':
    ans = main()
    print(ans)
# Judge status: Accepted
N = int(input())
s = []
for _ in range(N):
    s.append(''.join(sorted(input().lower())))

l = {}
for n in range(N):
    if s[n] in l:
        l[s[n]] += 1
    else :
        l[s[n]] = 1

print(sum(l[k] * (l[k]-1) // 2 for k in l))
# Judge status: Wrong Answer
import math

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

m = 0
M = max(A)

while(M-m>0.0001):
    mm = 0

    mid = (M+m)/2
    for i in range(N):
        mm += math.ceil(A[i]/mid)-1

    if mm>K:
        m = mid+1
    else:
        M = mid

print(math.ceil(mid))
# Judge status: Wrong Answer
N=int(input())

if N<2:
	print(0)
elif N==2:
	print(2)
else:
	without=10**(N-2)
	each=N*(N-1)
	final=without*each

	considered=final%(1000000007)

	print(int(considered))
# Judge status: Accepted
n, m = map(int, input().split())
LR = [list(map(int, input().split())) for _ in range(m)]

L = []
R = []
L_append = L.append
R_append = R.append
for l, r in LR:
    L.append(l)
    R.append(r)

min_R = min(R)
max_L = max(L)
if min_R >= max_L:
  ans = min_R +1 - max_L
else:
  ans = 0
  
print(ans)
# Judge status: Accepted
def main():
    from builtins import int, map, list, print
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    N = input_number()
    a = input_number_list()
    a.sort(reverse=True)
    alice = sum(a[::2])
    bob = sum(a[1::2])
    print(alice - bob)


if __name__ == '__main__':
    main()
# Judge status: Accepted
n  = int(input())
ps = []

for _ in range(0, n):
  x, l = [int(y) for y in input().split()]
  ps.append((x + l, x - l))

ps.sort()

x = ps[0][0]
d = 0

for i in range(1, n):
  p = ps[i]
  
  if p[1] < x:
    d += 1
  else:
    x = p[0]

print(n - d)
# Judge status: Accepted
input_val1, input_val2 = map(int, input().split())

prod = input_val1 * input_val2

if (prod % 2) == 0:
    print ('Even')
else:
    print('Odd')
# Judge status: Wrong Answer
N = int(input())
T = [list(map(int,input().split())) for _ in range(N)]
dp = [[0]*3 for _ in range(N)]
for i in range(N):
  if i == 0:
    dp[i] = T[i]
  for j in [0,1,2]:
    dp[i][j] = max([dp[i-1][j1]+T[i][j] for j1 in [0,1,2] if j1 != j])
print(max(dp[-1]))
# Judge status: Accepted
from collections import Counter
n=int(input())
a=list(map(int,input().split()))

c=Counter(a)
can_make=[i[0] for i in c.items() if i[1]>=2]
can_make_square=[i[0] for i in c.items() if i[1]>=4]
can_make+=can_make_square
can_make.sort()

if len(can_make)<2:
    print(0)
else:
    print(can_make[-1]*can_make[-2])
# Judge status: Accepted
n,m=map(int,input().split())
edg=[[] for i in range(n+1)]
for i in range(m):
    a,b=map(int,input().split())
    edg[a].append(b)
    edg[b].append(a)
f=1
for i in range(2,n+1):
    if 1 in edg[i] and n in edg[i]:
        f=0
print("POSSIBLE" if f==0 else "IMPOSSIBLE")
# Judge status: Accepted
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
if abs(A-B)>(V-W)*T:
    print("NO")
else:
    print("YES")
# Judge status: Accepted
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
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):
            x = gcd(i,j)
            ans += gcd(x,k)
print(ans)
# Judge status: Wrong Answer
l, r, d = map(int, input().split())

if d != 1:
  print(int(r//d -l //d))
else:
  print(r-l+1)
# Judge status: Accepted
k=int(input())
a,b=list(map(int,input().split()))
s=[]
for i in range(a,b+1):
  s.append(i%k)
if 0 in s:
  print("OK")
else:
  print("NG")
# Judge status: Accepted
a, b = list(map(int, input().split()))
 
if a%b == 0:
    print("0")
else:
    print("1")
# Judge status: Accepted
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

def solve():
    str = (input().rstrip())
    str = str.replace("hi","")
    if(len(str) == 0):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    solve()
# Judge status: Accepted
n,m = list(map(int,input().strip().split()))

# 2次元配列
student = []
for i in range(n):
    array = list(map(int, input().strip().split()))
    student.append(array)

cp = []
for i in range(m):
    array = list(map(int, input().strip().split()))
    cp.append(array)

result = [0] * n
for i in range(n):
  dis_min = 10**9
  for j in range(m):
    dis = abs(student[i][0]-cp[j][0]) + abs(student[i][1] - cp[j][1])
    if dis < dis_min:
      dis_min = dis
      result[i] = j+1

for i in result:
  print(i)
# Judge status: Accepted
N=int(input())
p=list(map(int,input().split()))
K=0
for i in range(0,N):
    if p[i]==i+1:
        K=K
    else:
        K=K+1
if K==0 or K==2:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
a, b = map(int, input().split())
if a == 1: a += 13
if b == 1: b += 13
if a > b: print('Alice')
elif a < b: print('Bob')
else: print('Draw')
# Judge status: Accepted
N = int(input())
A_list = list(map(int, input().split()))

def gcd(v1, v2):
    if v2 == 0:
        return v1
    return gcd(v2, v1%v2)

tmp = A_list[0]
for a in A_list:
    tmp = gcd(tmp, a)

print(tmp)
# Judge status: Accepted
def divi(x):
    d = []
    for i in range(1, int(x**0.5)+1):
        if x%i == 0:
            d.append(i)
            if i!=(x//i):
                d.append(x//i)
    return d
n = int(input())
ans = 0
for j in range(1, n+1, 2):
    if len(divi(j)) == 8:
        ans += 1
print(ans)
# Judge status: Wrong Answer
# C - Reconciled?
N, M = map(int,input().split())

S = 1
for i in range(1,min(N,M)):
    S *= i

ans = 0
if abs(N-M) > 1:
    ans = 0
elif abs(N-M) == 1:
    ans = S*S*max(N,M)
else:
    ans = S*S*2

ans = ans % 1000000007

print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
l = [a[i]-i-1 for i in range(n)]
b = sorted(l)[n//2]
ans = 0
for i in range(n):
    ans += abs(l[i]-b)
print(ans)
# Judge status: Accepted
import fractions
n = int(input())
a = list(map(int,input().split()))
ans = 0
l = [0]*(n+1)
r = [0]*(n+1)
for i in range(n):
    l[i+1] =  fractions.gcd(l[i],a[i])
for i in range(n-1,0,-1):
    r[i] =  fractions.gcd(r[i+1],a[i])
for i in range(n):
    L = l[i]
    R = r[i+1]
    ans = max(ans,fractions.gcd(L,R))
print(ans)
# Judge status: Accepted
N = int(input())

print(N//2 + N%2)
# Judge status: Wrong Answer
n=int(input())
s=str(input())
if n%2==1:
    print("No")
else:
    a=int(n/2-1)
    b=int(n/2)
    c=n-1
    d=s[0:a]
    e=s[b:c]
    if d==e:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
x,y = map(int,input().split())
 
if abs(y) > abs(x):
  if x >= 0 and y >= 0:
    print(y-x)
  elif x < 0 and y <0:
    print(abs(y)-abs(x)+2)
  else:
    print(abs(y)-abs(x)+1)
elif abs(y) < abs(x):
  if x > 0 and y > 0:
    print(x - y + 2)
  elif x <= 0 and y <=0:
    print(abs(abs(y)-abs(x)))
  else:
    print(abs(abs(y)-abs(x))+1)
else:
  if x == y:
    print("0")
  else:
    print("1")
# Judge status: Accepted
def q2():
    days, _ = [int(i) for i in input().split(" ")]
    hw = [int(i) for i in input().split(" ")]

    play = days - sum(hw)
    if play < 0:
        play = -1
    print(play)
    
q2()
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    S = input().strip()

    if S.count("RRR"):
        print(3)
    elif S.count("RR"):
        print(2)
    elif S.count("R"):
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()
# Judge status: Accepted
str1 = input()
str2 = input()

idx = 0
cnt = 0
for _ in range(len(str1)):
    if str1[idx] != str2[idx]:
        cnt += 1
    idx += 1

print(cnt)
# Judge status: Wrong Answer
n = int(input())
for i in range(1, n):
  if round(i * 1.08) == n:
    print(i)
    exit()
print(':(')
# Judge status: Accepted
n=int(input())
a=[i for i in map(int, input().split())]

a.sort()
for i in range(n-1):
    if a[i]==a[i+1]:
        print('NO')
        exit(0)
print('YES')
# Judge status: Accepted
K, N = map(int, input().split())
A = list(map(int, input().split()))
B = [abs(x - y) for x, y in zip(A[1:], A)]
B += [K - A[-1] + A[0]]

print(sum(B) - max(B))
# Judge status: Wrong Answer
s, w = map(int, input().split())

if s < w:
    print("unsafe")
else:
    print("safe")
# Judge status: Wrong Answer
n = int(input())
H = list(map(int, input().split()))
ans = 0
c = 0
for i in range(n-1):
    if H[i] >= H[i+1]:
        c += 1
    else:
        ans = min(ans, c)
        c = 0
print(ans)
# Judge status: Accepted
s = input().split()
s_replace = [x.replace('?', 'D') for x in s]
print(s_replace[0])
# Judge status: Accepted
N,K,*dd = map(int, open(0).read().split())

valid = [1] * 10
for d in dd:
    valid[d] = 0
digits = [i for i,v in enumerate(valid) if v]
num_digit = len(str(N))

from itertools import product
from sys import exit
for ans_digit in [num_digit, num_digit+1]:
    for x in product(digits, repeat=ans_digit):
        x = int(''.join(map(str, x)))
        if x >= N:
            print(x)
            exit()
# Judge status: Accepted
import collections
N = int(input())
S = [input() for i in range(N)]
C = collections.Counter(S)
print(len(C))
# Judge status: Accepted
n = int(input())
a = [int(x) for x in input().split()]

x = 0
ans = []
suma = sum(a)

for i in range(n - 1):
    x += a[i]
    ans.append(abs(suma - x * 2))
else:
    print(min(ans))
# Judge status: Accepted
n, m = map(int, input().split())
student = [tuple(map(int, input().split())) for _ in range(n)]
check_points = [tuple(map(int, input().split())) for _ in range(m)]
for a, b in student:
    dst_min = float('inf')
    ans = float('inf')
    for i, (c, d) in enumerate(check_points):
        now = abs(a - c) + abs(b - d)
        if now < dst_min:
            dst_min = now
            ans = i + 1
    print(ans)
# Judge status: Accepted
n=int(input())
b=[int(i) for i in input().split()]
c=b[0]+b[-1]
for i in range(1,n-1):
  c+=min(b[i],b[i-1])
print(c)
# Judge status: Accepted
o = list(input())
e = list(input()) + [""]

for x, y in zip(o, e):
    print(x + y, end="")
# Judge status: Accepted
a = int(input())
print (a+a*a+a*a*a)
# Judge status: Accepted
Row = int(input())
List = []
for i in range (Row):
  List.append(int(input()))
List.sort(reverse = True)
mid = 0
for i in range(Row):
  mid += List[i]
sumList = [mid]* (Row+1)
for i in range(Row):
  sumList[i] = sumList[i]-List[i]
  if sumList[i] % 10 == 0:
    sumList[i]=0
if sumList[Row] % 10 == 0:
  sumList[Row] = 0
res = max(sumList)
print(res)
# Judge status: Accepted
a,b = [int(x) for x in input().split()]
if a*b % 2 == 0:
    print("Even")
else:
    print("Odd")
# Judge status: Wrong Answer
S = input()
K = int(input())
L = 0

for s in range(len(S)):
  if S[s]=="1":
    L+=1
  else:
    L+=int(S[s])*5000000000000000
    if L>K:
      print(S[s])
      exit()
# Judge status: Accepted
def dfs(pos, Str, res):
    #print(pos, Str, res)
    if pos == 4:
        if res == 7:
            print(Str + "=7")
            exit()
        return
    dfs(pos+1, Str + "+" + s[pos], res + int(s[pos]))
    dfs(pos+1, Str + "-" + s[pos], res - int(s[pos]))

s = input()
dfs(1, s[0], int(s[0]))
# Judge status: Accepted
n = int(input())
s = ""
al = "abcdefghijklmnopqrstuvwxyz"
 
while n > 0:
  o = (n-1) % 26
  n = (n-1) // 26
  s += al[int(o)]
 
print(s[::-1])
# Judge status: Accepted
def resolve():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    print(-(-(n-1)//(k-1)))

resolve()
# Judge status: Accepted
n=int(input())
a=[int(input()) for i in range(n)]
sa=sorted(a)

for i in a:
  if sa[-1]==i:
    print(sa[-2])
  else:
    print(sa[-1])
# Judge status: Accepted
n, m = map(int, input().split())
if n % 2 != 0:
    for i in range(m):
        print(i + 1, n - i)
else:
    for i in range(m):
        if i < m / 2:
            print(i + 1, n - i)
        else:
            print(i + 1, n - i - 1)
# Judge status: Wrong Answer
class monster:
    stamina = 0
    attack= 0
    def __init__(self,stamina,attack):
        self.stamina = stamina
        self.attack = attack


abcd = input().split()
abcd=[int(x) for x in abcd]
a = abcd[0]
b = abcd[1]
c = abcd[2]
d = abcd[3]



taka = monster(a,b)
aoki = monster(c,d)

while(1):
    aoki.stamina = aoki.stamina-taka.attack
    if aoki.stamina<=0:
        print('No')
        break
    taka.stamina = taka.stamina-aoki.attack
    if taka.stamina<=0 :
        print('Yes')
        break
# Judge status: Accepted
n = int(input())
h = list(map(int,input().split()))

dp = [0] * n

dp[0] = 0
dp[1] = abs(h[1] - h[0])

for i in range(2,n):
    dp[i] = min(abs(h[i]-h[i-1])+dp[i-1],abs(h[i]-h[i-2])+dp[i-2])

print(dp[n-1])
# Judge status: Accepted
from functools import reduce
from fractions import gcd


def find_lcm(a, b):
    return a * b // gcd(a, b)


def main():
    n = int(input())
    t = [int(input()) for _ in range(n)]
    print(reduce(find_lcm, t))


if __name__ == '__main__':
    main()
# Judge status: Accepted
K,X=map(int, input().split())
if K*500>=X:
    print('Yes')
else:
    print('No')
# Judge status: Accepted

N = int(input())

activity = [list(map(int, input().split())) for _ in range(N)]

dp = [[0] * 3 for _ in range(N)]

dp[0][0] = activity[0][0]
dp[0][1] = activity[0][1]
dp[0][2] = activity[0][2]

for i in range(1, N):
    dp[i][0] = max(dp[i-1][1], dp[i-1][2]) + activity[i][0]
    dp[i][1] = max(dp[i-1][2], dp[i-1][0]) + activity[i][1]
    dp[i][2] = max(dp[i-1][0], dp[i-1][1]) + activity[i][2]

print(max(dp[N-1]))
# Judge status: Accepted
l,r,d=map(int,input().split())
cnt=0
for i in range(l,r+1):
    if(i%d==0):
        cnt+= 1
print(cnt)
# Judge status: Accepted
w, h, n = map(int, input().split())
xya = [list(map(int, input().split())) for _ in range(n)]

width = [0, w]
height = [0, h]

for x, y, a in xya:
    if a == 1:
        width = [max(width[0], x), width[1]]
    elif a == 2:
        width = [width[0], min(width[1], x)]
    elif a == 3:
        height = [max(height[0], y), height[1]]
    elif a == 4:
        height = [height[0], min(height[1], y)]

ans = max(0, width[1] - width[0]) * max(0, height[1] - height[0])
print(ans)
# Judge status: Wrong Answer
def resolve():
    from fractions import gcd
    a, b, c, d = map(int, input().split())
    e = c*d/gcd(c,d)
    db = b - b//c - b//d + b//e
    da = a-1 - (a-1)//c - (a-1)//d + (a-1)//e
    print(int(db-da))
resolve()
# Judge status: Accepted
S, C = [int(n) for n in input().split(" ")]

if 2 * S >= C:
  print(min([S, int(C/2)]))
else:
  print(S + int((C - 2 * S) / 4))
# Judge status: Wrong Answer
N = int(input())
i = 5
ans = 0

for j in range(10**8):
    num = N//(i*2)
    if num == 0:
        break
    else:
        ans += num
        i = i*5

print(ans)
# Judge status: Accepted
a, b, k = map(int, input().split())
ans = []
d = max(a, b)
for i in range(1, d+1):
    if a % i == 0 and b % i == 0:
        ans.append(i)
print(ans[-k])
# Judge status: Wrong Answer
k = input().split()
a = k[0]
b = k[1]
c = k[2]
Sum = 0
h = max(k)

Buf = 1
del k[k.index(h)]
for i in k:
    Buf = Buf * int(i)
r = Buf/2
print(int(r))
# Judge status: Accepted
N = int(input())
s = [int(input()) for _ in range(N)]

res = 0
other = []

for num in s:
  if num % 10 == 0:
    res += num
  else:
    other.append(num)
    
if other:
  other.sort()
  res += sum(other)
  if res % 10 == 0:
    res -= other[0]
  print(res)
  
else:
  print(0)
# Judge status: Accepted
import sys
input = sys.stdin.readline
import math
a,b,c,d,e = map(int,input().split())
print(max((c-a)*60+(d-b)-e,0))
# Judge status: Accepted
import math

bl=input().split()
n=int(bl[0])
s=int(bl[1])

for a in range(math.ceil(s/2)):
  print(str(a+1)+" "+str(s-a+1))
for b in range(math.floor(s/2)):
  print(str(s+b+2)+" "+str(2*s-b+1))
# Judge status: Accepted
a,b=map(int,input().split())
total=0
for i in range(2):
    if  a>=b:
        total+=a
        a-=1
    else:
        total+=b
        b-=1
print(total)
# Judge status: Wrong Answer
N = int(input())
count = 0
for i in range(N+1):
  if i % 2 == 1:
    count += 1
    break
  else:
    pass
ans = N / count
print('{:.08f}'.format(ans))
# Judge status: Accepted
n = int(input())
l = [[] for _ in range(n)]
d = [[] for _ in range(n)]
for i in range(n):
    l[i] = list(map(int,input().split()))
    d[i] = [l[i][0]-l[i][1],l[i][0]+l[i][1]]

d.sort(key=lambda x:x[1])
ma = -9999999
c = 0
for i in range(n):
    if(d[i][0] >= ma):
        ma = d[i][1]
        c += 1
print(c)
# Judge status: Accepted
import sys
n = int(input())
txy = []
for i in range(n):
  txy.append(list(map(int, input().split())))
pt = 0
py = 0
px = 0
for t, x, y in txy:
  dt = t - pt
  dx = x - px
  dy = y - py
  ax = abs(dx) % 2
  ay = abs(dy) % 2
  a = (ax + ay) % 2
  if abs(dx) + abs(dy) > dt or a != dt % 2:
    print("No")
    sys.exit()
print("Yes")
# Judge status: Accepted
def resolve():
    x=int(input())
    q,mod=divmod(x,11)
    if mod==0:
        print(q*2)
    elif 1<=mod<=6:
        print((q+1)*2-1)
    else:
        print((q+1)*2)





resolve()
# Judge status: Wrong Answer
N, Q = map(int, input().split())
S = input()
t=[0]*(N+1) 
for i in range(N):
	t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0) 
for i in range(Q):
	l, r = map(int, input().split())
print(t[r-1] - t[l-1])
# Judge status: Accepted
N, X, Y = map(int, input().split())

ans = [0] * (N + 1)

for i in range(1, N+1):
    for j in range(i+1, N+1):
        # print(i, j)
        tmp = abs(i-X) + abs(j - Y) + 1
        minV = min( abs(i-j) ,tmp)
        ans[minV] += 1

for i in range(1, N):
    print(ans[i])
# Judge status: Accepted
x = int(input())

print(((x-1)//11)*2 + ((x-1)%11)//6 + 1)
# Judge status: Accepted
S=input()
if S[0]=='A':
  if 'C' in S[2:-1]:
    S=S.lstrip('A')
    S=S.replace('C','',1)
    if str.islower(S):
      print('AC')
      exit()
print('WA')
# Judge status: Accepted
N = int(input())

if N % 2 == 0:
    print(0.5)
else:
    print((N // 2 + 1) / N)
# Judge status: Wrong Answer
N, C, K = map(int, input().split())
T = [int(input()) for i in range(N)]
T.sort()

ans = 1
bus = C
time = T[0] + K
for i in T:
    # バスの定員に空きがあり、かつ、乗車1人目の許容時間内の場合同じバスに乗る
    if (bus > 0) & (i < time):
        bus -= 1
    # バスが定員、または、乗車1人目の許容時間外の場合新しいバスに乗る
    else:
        bus = C - 1
        time = i + K
        ans += 1

print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())
print(int(a*b/2))
# Judge status: Wrong Answer
N = int(input())
numbers = list(map(int,input().split()))
numOfOperation = int(input())
dic = {}

for num in numbers:
    if num in dic : dic[num] += 1
    else: dic[num] = 1
    

sums = sum(numbers)
for i in range(numOfOperation):
    B,C = map(int,input().split())
    dic[B] = 1
    dic[C] = 0
    sums += dic[B] * (C - B)
    print(sums)
# Judge status: Wrong Answer
N = int(input()) 
P = tuple(map(int, input().split()))
Q = tuple(map(int, input().split()))
A = list(range(1,N+1))
Alist=[]
import itertools
for v in itertools.permutations(A):
        Alist.append(v)
a_num = Alist.index(P)+1
b_num = Alist.index(Q)+1
print(b_num - a_num)
# Judge status: Wrong Answer
s = int(input())
ans = 4
while ans != 4:
  ans += 1
  if s % 2 == 0:
    s //= 2
  else:
    s = s*3+1
print(ans)