Harryxun/stf_run huggingface dataset:
def yesNo(X):
  if X <= 30:
    print('Yes')
  else:
    print('No')

yesNo(X)

### FIXED CODE ###

X = int(input())
if X >= 30:
    print('Yes')
else:
    print('No')
from collections import deque, defaultdict
from time import time

N = int(input())
A = deque([deque(map(lambda a: (i, int(a) - 1), input().split())) for i in range(N)])

canBattle = defaultdict(lambda: False)
D = [0] * N

while True:
    isChanged = False
    i, a = A.popleft()
    if not a:
        continue
    A.append((i, a))
    j = a[0]
    canBattle[(i, j)] = True

    if canBattle[(j, i)]:
        isChanged = True
        A[i].popleft()
        A[j].popleft()
        d = max(D[i], D[j])
        D[i], D[j] = d + 1, d + 1
    if all(len(a) == 0 for a in A):
        print(max(D))
        exit()
    if not isChanged:
        break

print(-1)


### FIXED CODE ###

import sys
from heapq import heappop, heappush
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
MOD = 10**9 + 7
INF = float('inf')


def sol():
    N = int(input())
    A = [deque()] + [deque(map(int, input().split())) for _ in range(N)]

    days = [0] * (N + 1)
    now = [0] * (N + 1)

    que = deque([i + 1 for i in range(N)])

    while que:
        i = que.popleft()
        if not A[i]:
            continue

        a = A[i].popleft()
        if now[a] == i:
            days[a] = days[i] = max(days[a], days[i]) + 1
            que.append(i)
            que.append(a)
            now[a] = now[i] = 0
        else:
            now[i] = a

    for i in range(1, N + 1):
        if A[i]:
            print(-1)
            return
    print(max(days))


sol()
n = int(input())
f_x=0
for i in range(len(n)):
    f_x+=int(n[i])
if int(n)%f_n==0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n = input()
f_x=0
for i in range(len(n)):
    f_x+=int(n[i])
if int(n)%f_x==0:
    print('Yes')
else:
    print('No')
# coding: utf-8
# Your code here!

a = list(map(int,input().split()))

b = list(map(int,input().split()))

d = 0
k = 0
su = 0

for i in range(a[2]):
    k += 1
    su = max(su,k)
    if b[d] = i + 1:
        k = 0
    
print(su)    
    



### FIXED CODE ###

# coding: utf-8
# Your code here!

a = list(map(int,input().split()))

b = list(map(int,input().split()))

k = [0]*a[2]
pp = 0
su = 0

for i in b:
    for j in range(a[2]):
        if j >= i - a[1]   and j <= i + a[1] - 1:
                k[j] += 1
            
for i in range(a[2]):
    if k[i] == 0:
        su += 1
        
print(su)
import fractions
import functools
import sys
sys.setrecursionlimit(1000000)

n=int(input())
a = [int(i) for i in input().split()]
a.sort()

if len(a) == 2:
  print(max(a))
  sys.exit()
  
gcd_a = functools.reduce(fractions.gcd, a)
a=[i//gcd_a for i in a]

cnt = 0
gcd_0 = functools.reduce(fractions.gcd, a[1:])
for i in range(1,len(a)):
  if fractions.gcd(a[0],a[i]) == 1:
    so = i
    cnt+=1
    if cnt == 2:
      print(max(gcd_a,gcd_0*gcd_a))
      sys.exit()

a_i = [i for i in a if i != a[so]]
gcd_i = functools.reduce(fractions.gcd, a_i)

print(max(gcd_0,gcd_i)*gcd_a)
   

### FIXED CODE ###

import fractions
import functools
import sys

n=int(input())
a = [int(i) for i in input().split()]
a.sort()

if len(a) == 2:
  print(max(a))
  sys.exit()
  
gcd_a = functools.reduce(fractions.gcd, a)
a=[i//gcd_a for i in a]

so = 0
cnt = 0
gcd_0 = functools.reduce(fractions.gcd, a[1:])
for i in range(1,len(a)):
  if fractions.gcd(a[0],a[i]) == 1:
    so = i
    cnt+=1
    if cnt == 2:
      print(max(gcd_a,gcd_0*gcd_a))
      sys.exit()

a_i = [i for i in a if i != a[so]]
gcd_i = functools.reduce(fractions.gcd, a_i)

print(max(gcd_0,gcd_i)*gcd_a)
N = int(input())
d = list([int(input()) for i in range(N)])
print(d.count())

### FIXED CODE ###

print(len(set([int(input()) for _ in range(int(input()))])))
import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
    
S = list(input())
length=len(S)
dp = [[0 for _ in range(13)] for _ in range(length)]
dp[0][0]=1
for i in range(length-1):
    if S[length-i-2] == "?":
        for k in range(10):
            for j in range(13):
                j_sub = j-k*10**i%13
                if j_sub < 0: j_sub+= 13
                dp[i+1][j]+=dp[i][j_sub]
    else:
        for j in range(13):
            j_sub = j-int(S[length-i-2])*10**i%13
            if j_sub < 0: j_sub+= 13
            dp[i+1][j]+=dp[i][j_sub]
print(dp[length-1][5]%1000000007)
for j in range(13):

### FIXED CODE ###

import sys
input = sys.stdin.readline
def main():  
    S = list(input())
    S.pop()
    length=len(S)
    dp = [0]*13
    dp[0]=1
    mul=1
    mod=1000000007
    for i in range(1,length+1):
        next_dp = [0]*13
        for j in range(13):
            if S[length-i] == "?":
                for k in range(10):
                    j_sub=(j+k*mul)%13
                    next_dp[j_sub]+=dp[j]
                    next_dp[j_sub]%=mod
            else:
                j_sub=(j+int(S[length-i])*mul)%13
                next_dp[j_sub]+=dp[j]
                next_dp[j_sub]%=mod
        dp=next_dp
        mul=mul*10%13
    print(dp[5]%1000000007)
if __name__ == "__main__":
    main()
import math
n, m = map(int, input().split())
ans = math.factorial(n - 1) + math.factorial(m)
print(ans)

### FIXED CODE ###

from math import factorial
n, m = map(int, input().split())
c_n = factorial(n) / (factorial(2) * factorial(n - 2)) if n > 1 else 0
c_m = factorial(m) / (factorial(2) * factorial(m - 2)) if m > 1 else 0
ans = int(c_n) + int(c_m)
print(ans)
s = input()
K = int(input())
 
li = sorted(list(set(s)))
result = []

def substring(l):
    result.append(l)
    if len(result) >= K:
        pass
    for m in li:
        if l+m in s:
            return substring(l+m)

for l in li:
    substring(l)
print(result)

print(result[K-1])

### FIXED CODE ###

s = input()
K = int(input())
 
li = sorted(list(set(s)))
result = []

def substring(l):
    result.append(l)
    if len(result) < K:
        for m in li:
            if l+m in s:
                return substring(l+m)
    else:
        pass

for l in li:
    substring(l)

print(result[K-1])
N, M = map(int,input().split())
#M 夏休み期間　M　宿題数
A = list(map(int, input().split()))
A_sum = 0
for i in range(0, n):
    A_sum += A[i]
    # A_sum 宿題全日数
x = N - A_sum
if x < N:
    print("-1")
else:
    print(x)

### FIXED CODE ###

N, M = map(int,input().split())
#M 夏休み期間　M　宿題数
A = list(map(int, input().split()))
A_sum = 0
for i in range(0, M):
    A_sum += A[i]
    # A_sum 宿題全日数
x = N - A_sum
if x < 0:
    print("-1")
else:
    print(x)
from itertools import izip

N, M, C = (int(x) for x in raw_input().split())
B = [int(x) for x in raw_input().split()]
A = [[int(x) for x in raw_input().split()] for i in xrange(N)]
result = 0
for i in xrange(N):
  cur_sum = C
  for a, b in izip(A, B):
    cur_sum += a * b
  if cur_sum > 0:
    result += 1
print(result)


### FIXED CODE ###

from itertools import izip

N, M, C = (int(x) for x in raw_input().split())
B = [int(x) for x in raw_input().split()]
A = [[int(x) for x in raw_input().split()] for i in xrange(N)]
result = 0
for i in xrange(N):
  cur_sum = C
  for a, b in izip(A[i], B):
    cur_sum += a * b
  if cur_sum > 0:
    result += 1
print(result)
if __name__ =='__main__':
    N ＝ input()
    A = input()
    ans = N**2 - A
    print(ans)

### FIXED CODE ###

if __name__ =='__main__':
    N = int(input())
    A = int(input())
    ans = N**2-A
    print(ans)
s=input()
ans=''
lis=[]
for i in s:
    if i in 'ATGC':
        ans += i
    else:
        lis.append(ans)
        ans=''
print(len(max(lis)))

### FIXED CODE ###

s=input()
ans=''
lis=[]
for i in s:
    if i in 'ATGC':
        ans += i
        if i == s[-1]:
            lis.append(len(ans))
    else:
        lis.append(len(ans))
        ans=''

print((max(lis)))
import numpy as np

s = input().split()
N = int(s[0])
M = int(s[1])
A = np.array(list(map(int, input().split())))
for i in range(M):
    A[A.argmax()] //= 2
print(np.sum(A))


### FIXED CODE ###

wea = input()
if wea == "Sunny":
    print("Cloudy")
elif wea == "Cloudy":
    print("Rainy")
else:
    print("Sunny")
n=int(input())
lr=[list(map(int,input().split())) for _ in range(n)]
lr.sort(key=lambda x:x[0])
# 右端がもっとも左にある問題
r0=0
tmpr=float('inf')
# 左端がもっとも右にある問題
l0=0
tmpl=0
for i,x in enumerate(lr):
  l,r=x
  if tmpl<l:
    l0=i
    tmpl=l
  if tmpr>r:
    r0=i
    tmpr=r
if l0==r0:
  ans=lr[r0][1]-lr[l0][0]+1
  tmp=0
  for i in range(n):
    if i==l0:continue
    l,r=lr[i]
    tmp=max(tmp,r-l+1)
  ans+=tmp
  print(ans)
  exit()
ans0=max(0,lr[r0][1]-lr[l0][0]+1)
tmp=0
for i in range(n):
  if i==l0 or i==r0:continue
  l,r=lr[i]
  tmp=max(tmp,r-l+1)
ans0+=tmp


import heapq
class pqheap:
  def __init__(self,key=None):
    self.p = list()
    self.q = list()
  def insert(self,x):
    heapq.heappush(self.p, x)
    return
  def erase(self,x):
    heapq.heappush(self.q, x)
    return
  def minimum(self):
    while self.q and self.p[0] == self.q[0]:
      heapq.heappop(self.p)
      heapq.heappop(self.q)
    return self.p[0] if len(self.p)>0 else None
pq=pqheap()

[pq.insert(x[1]) for i,x in enumerate(lr) if i!=l0 and i!=r0]
l1,r1=lr[r0]
l2,r2=lr[l0]
r2=min(r2,pq.minimum())
ans1=max(r1-l1+1,0)
ans1+=max(r2-l2+1,0)
for i,[l,r] in enumerate(lr):
  if i==l0 or i==r0:continue
  tmp=0
  l1=max(l1,l)
  pq.erase(r)
  tmp=max(r1-l1+1,0)
  if pq.minimum():
    r2=min(lr[l0][1],pq.minimum())
  else:
    l2,r2=lr[l0]
  tmp+=max(r2-l2+1,0)
  ans1=max(ans1,tmp)
print(max(ans1,ans0))


### FIXED CODE ###

n=int(input())
lr=[list(map(int,input().split())) for _ in range(n)]
lr.sort(key=lambda x:x[0])
# 右端がもっとも左にある問題
r0=0
tmpr=float('inf')
# 左端がもっとも右にある問題
l0=0
tmpl=0
for i,x in enumerate(lr):
  l,r=x
  if tmpl<l:
    l0=i
    tmpl=l
  if tmpr>r:
    r0=i
    tmpr=r
if l0==r0:
  ans=lr[r0][1]-lr[l0][0]+1
  tmp=0
  for i in range(n):
    if i==l0:continue
    l,r=lr[i]
    tmp=max(tmp,r-l+1)
  ans+=tmp
  print(ans)
  exit()
ans0=max(0,lr[r0][1]-lr[l0][0]+1)
tmp=0
for i in range(n):
  if i==l0 or i==r0:continue
  l,r=lr[i]
  tmp=max(tmp,r-l+1)
ans0+=tmp


import heapq
class pqheap:
  def __init__(self,key=None):
    self.p = list()
    self.q = list()
  def insert(self,x):
    heapq.heappush(self.p, x)
    return
  def erase(self,x):
    heapq.heappush(self.q, x)
    return
  def minimum(self):
    while self.q and self.p[0] == self.q[0]:
      heapq.heappop(self.p)
      heapq.heappop(self.q)
    return self.p[0] if len(self.p)>0 else None
pq=pqheap()

[pq.insert(x[1]) for i,x in enumerate(lr) if i!=l0 and i!=r0]
l1,r1=lr[r0]
l2,r2=lr[l0]
if pq.minimum():r2=min(r2,pq.minimum())
ans1=max(r1-l1+1,0)
ans1+=max(r2-l2+1,0)
for i,[l,r] in enumerate(lr):
  if i==l0 or i==r0:continue
  tmp=0
  l1=max(l1,l)
  pq.erase(r)
  tmp=max(r1-l1+1,0)
  if pq.minimum():
    r2=min(lr[l0][1],pq.minimum())
  else:
    l2,r2=lr[l0]
  tmp+=max(r2-l2+1,0)
  ans1=max(ans1,tmp)
print(max(ans1,ans0))
a,b = map(int,input())
print(max(a,b)*2 -1)


### FIXED CODE ###

a,b = map(int,input().split())
if a != b :
    print(max(a,b)*2 -1)
else :
    print(a*2)
usrInput = input()
divisor = []
flag = []
finalFlag = False

for kuku in range(9):
    currentDivisor = kuku+1
    if int(usrInput) % currentDivisor == 0:
        divisor.append(currentDivisor)

for x in range(len(divisor)):
    anotherDivisor:float = int(usrInput) / divisor[x]
    if float.is_integer(anotherDivisor) == True and anotherDivisor <= 9:
        flag.append(True)
    else:
        flag.append(False)

for n in range(len(divisor)):
    if bool(flag[n]) == True:
        finalFlag = True

if finalFlag == True:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

usrInput = input()
splitedInput = usrInput.split()
clearFlag = []

for i in range(2):
    if int(splitedInput[i]) < 10:
        clearFlag.append(True)
    else:
        clearFlag.append(False)

if bool(clearFlag[0]) == True and bool(clearFlag[1]) == True:
    print(int(splitedInput[0]) * int(splitedInput[1]))
else:
    print(-1)
a,b=input().split()
c=(b-1)//a+1
print(c)

### FIXED CODE ###

a,b = list(map(int, input().split()))
i=0
while b>(a-1)*i+1:
	i+=1
print(i)
S=input()
if S.count('+') = 0:
 print(-4)
elif S.count('+') = 1:
 print(-2)
elif S.count('+') = 2:
 print(0)
elif S.count('+') = 3:
 print(2)
else:
 print(4)

### FIXED CODE ###

S=input()
if S.count('+') == 0:
 print(-4)
elif S.count('+') == 1:
 print(-2)
elif S.count('+') == 2:
 print(0)
elif S.count('+') == 3:
 print(2)
else:
 print(4)
n, k = map(int, input().split())
m = [True]*n

for i in range(k):
    d = int(input())
    a = (list(map(int, input().split())))
    for j in a:
        m[j-1] = False
        
ans = [i for i in range(n) if m[i]]
print(len(ans))


### FIXED CODE ###

s = input()

if s == "ABC":
    print("ARC")
else:
    print("ABC")
a=x**3
print(int(a))

### FIXED CODE ###

x = int(input())
print(x**3)
d={}
for _ in[0]*int(input()):
 a,v=map(int,input().split())
 d[a]=v
m=max(d.items(),key=lambda x:x[1])[0]
print(m,min(d[m]))


### FIXED CODE ###

d={}
for _ in[0]*int(input()):
 a,v=map(int,input().split())
 d[v]=d[v]if v in d and a>d[v]else a
m=max(d)
print(d[m],m)
s=sorted(list(input()))
t=sorted(list(input()))[::-1]
#print(s,t)
for i in range(len(s)):
  if(s[i]<t[i]):
    print('Yes')
    break
  elif(s[i]>t[i]):
    print('No')
    break
  else:
    if(i<len(s)-1):pass
    else:#sの長さまでは同じ。sの方が短ければYes、そうでなければNo
      if(len(s)<len(t)):
        print('Yes')
        break
      else:
        print('No')
        break

### FIXED CODE ###

s=sorted(list(input()))
t=sorted(list(input()))[::-1]
for i in range(min(len(s),len(t))):
  if(s[i]<t[i]):
    print('Yes')
    break
  elif(s[i]>t[i]):
    print('No')
    break
  else:
    if(i<min(len(s)-1,len(t)-1)):pass
    else:#sの長さまでは同じ。sの方が短ければYes、そうでなければNo
      if(len(s)<len(t)):
        print('Yes')
        break
      else:
        print('No')
        break
H = int(input())

def solve(h):
    ans = 0
    if h==2 or h==3:
        ans = 3
    else:
        ans += 1
        ans += 2 * solve(h//2)
    return ans

ans = solve(H)
print(ans)

### FIXED CODE ###

H = int(input())

def solve(h):
    ans = 0
    if h==1:
        ans = 1
    else:
        ans += 1
        ans += 2 * solve(h//2)
    return ans

ans = solve(H)
print(ans)
n = int(inputs[0])
A = list(map(int, inputs[1].split()))
MOD = 998244353
B = [v for k, v in sorted(Counter(A).items())]
if A[0] != 0 or not all(A[1:]) or not all(m):
    print(0)
else:
    t, r = 1
    for b in B:
        t *= pow(r, b, MOD) % MOD
        r = b
    print(t)

### FIXED CODE ###

from collections import Counter
inputs = open(0).readlines()

n = int(inputs[0])
*D, = map(int, inputs[1].split())
mod = 998244353

nbs = [0] * (max(D)+1)
for k, v in Counter(D).items():
    nbs[k] = v

if D[0] != 0 or nbs[0] != 1:
    print(0)
else:
    ans = 1
    for n0, n1 in zip(nbs, nbs[1:]):
        ans = ans * pow(n0, n1, mod) % mod
    print(ans)
O = input()
E = input()
for i in range(len(O)):
	print(O[i],E[i],sep="",end="")
    

### FIXED CODE ###

O = input()
E = input()
for i in range(min(len(O),len(E))):
	print(O[i],E[i],sep="",end="")
if len(O) > len(E):
	print(O[-1])
import numpy as np

MOD=998244353
N=int(input())
A=np.array([int(input()) for _ in range(N)],dtype=np.uint32)

TOTAL=pow(3,N,MOD)
ASum=np.sum(A)

# dp=[[0 for _ in range(ASum+1)] for _ in range(2)]
dp=np.zeros((2,ASum+1),dtype=np.uint32)
dp[0][0] = 2
dp[0][A[0]] = 1

# dpOther=[[0 for _ in range(ASum+1)] for _ in range(2)]
dpOther=np.zeros((2,ASum+1),dtype=np.uint32)
dpOther[0][0] = 1
dpOther[0][A[0]] = 1

prev=0
current=1
curMax=A[0]
# for n in range(1,N):
for n, a in enumerate(A):
	if n==0:
		continue
	# curMax += a
	current = n % 2
	prev = (n+1) % 2
	# for e in range(curMax+1):
	dp[current,:] = dp[prev,:]*2 % MOD
	dp[current,a:] += dp[prev,:-a] % MOD

	if ASum %2 == 0:
		dpOther[current,:] = dpOther[prev,:] % MOD
		dpOther[current,a:] += dpOther[prev,:-a] % MOD

sumStart = 0
plus = 0

if ASum % 2 == 0:
	# 合計が偶数
	sumStart=ASum//2
	plus = (dpOther[current][ASum//2]*3) % MOD
else:
	# 合計が奇数の場合、ceil
	sumStart=ASum//2+1

exceptCnt=0
for s in range(sumStart,ASum+1):
	exceptCnt = (exceptCnt + dp[current][s]*3) % MOD

exceptCnt -= plus

print((TOTAL - exceptCnt) % MOD )



### FIXED CODE ###

import numpy as np

MOD=998244353
N=int(input())
A=np.array([int(input()) for _ in range(N)])
TOTAL=pow(3,N,MOD)
ASum=sum(A)
sumEnd=0
sumEnd=ASum//2+1

dp=np.array([0 for _ in range(sumEnd)],dtype=np.int64)
dp[0] = 1

for n in range(N):
	dp[A[n]:] += dp[:-A[n]]*2 % MOD

plus = 0
if ASum % 2 == 0:
	# 合計が偶数
	dpOther=np.array([0 for _ in range(sumEnd+1)],dtype=np.int64)
	dpOther[0] = 1
	for n in range(N):
		dpOther[A[n]:] += dpOther[:-A[n]] % MOD
	plus = (dpOther[ASum//2]*3) % MOD

exceptCnt=0
for s in range(0,sumEnd):
	exceptCnt = (exceptCnt + dp[s]*3) % MOD

exceptCnt -= plus
print((TOTAL - exceptCnt) % MOD )
#ABC063C
N = int(input())
s = [int(input()) for _ in range(N)]
ans = -1
s.sort()
for _ in range(N+1):
    ans = sum(s)
    if ans % 10 != 0:
        break
    elif len(s) == 0:
        ans = 0
        break
    elif len(s) >= 2:
        del_ok = False
        for i in range(1, len(s)):
            if (ans - s[0])%10 == 0 and (ans - s[i])%10 != 0:
                s.pop(i)
                del_ok = True
        if not del_ok:
            s.pop(0)
    else:
        s.pop(0)
print(ans)

### FIXED CODE ###

#ABC063C
N = int(input())
s = [int(input()) for _ in range(N)]
ans = -1
s.sort()
for _ in range(N+1):
    ans = sum(s)
    if ans % 10 != 0:
        break
    elif len(s) == 0:
        ans = 0
        break
    elif len(s) >= 2:
        del_ok = False
        for i in range(1, len(s)):
            if s[0]%10 == 0 and s[i]%10 != 0:
                s.pop(i)
                del_ok = True
                break
        if not del_ok:
            s.pop(0)
    else:
        s.pop(0)
print(ans)
H, W= map(int, input().split())
A = [list(map(int, input().split())) for _ in range(H)]
B = [list(map(int, input().split())) for _ in range(H)]
r_k = 80*80
diffs = [[abs(A[i][j] - B[i][j]) for j in range(W)] for i in range(H)]
dp = [[[False] * r_k for _ in range(W+1)] for _ in range(H+1)]
for i in range(H+1):
    dp[i][0][0] = True
for j in range(H+1):
    dp[0][j][0] = True
for i in range(H):
    for j in range(W):
        diff = diffs[i][j]
        for k in range(r_k):
            dp[i + 1][j + 1][abs(k - diff)] = dp[i + 1][j][k] or dp[i][j + 1][k] or dp[i + 1][j + 1][abs(k - diff)]
            if k + diff < r_k:
                dp[i + 1][j + 1][k + diff] = dp[i + 1][j][k] or dp[i][j + 1][k] or dp[i + 1][j + 1][k+diff]

for k in range(r_k):
    if dp[H][W][k]:
        print(k)
        break


### FIXED CODE ###

H, W = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(H)]
B = [list(map(int, input().split())) for _ in range(H)]
diffs = [[abs(A[i][j] - B[i][j]) for j in range(W)] for i in range(H)]
max_diff = 0
for diff in diffs:
    max_diff = max(max_diff, max(diff))
r_k = max_diff*(H+W)//2+1
dp = [[[False] * r_k for _ in range(W)] for _ in range(H)]
dp[0][0][0] = True
for i in range(H):
    for j in range(W):
        diff = diffs[i][j]
        dp_ = dp[i][j]
        if j < W-1:
            dpj = dp[i][j + 1]
            for k in range(r_k):
                if dp_[k] == True:
                    dpj[abs(k - diff)] = True
                    if k+diff<r_k:
                        dpj[k + diff] = True
        if i < H - 1:
            dpi = dp[i + 1][j]
            for k in range(r_k):
                if dp_[k] == True:
                    dpi[abs(k-diff)] = True
                    if k+diff < r_k:
                        dpi[k + diff] = True

ans = pow(80, 3)
diff = diffs[H-1][W-1]
for k, flg in enumerate(dp[H - 1][W - 1]):
    if flg:
        ans = min(ans, abs(k-diff), k+diff)
print(ans)
import math

def main():
    N = int(input())
    ans = [0]*(N+1)

    end = math.ceil(math.sqrt(N))

    for i in range(3,end+1):
        sn = i
        x = 1
        y = 1
        z = sn - 2
        ans[cal(x,y,z)] += func(i,x,y,z)
        while z >= math.ceil(sn / 2):
            y += 1
            z -= 1
            if x > z or y > z:
                break
            ans[cal(x,y,z)] += func(i,x,y,z)
            for j in range(y):
                x += 1
                z -= 1
                if x > z or y > z:
                    break
                ans[cal(x,y,z)] += func(i,x,y,z)
    
    for i in range(1,N+1):
        print(ans[i])
        

def func(n,x,y,z):
    if x == y and y == z and z == x:
        return 1
    elif x != y and y != z and z != x:
        return 6
    else:
        return 3

def cal(x,y,z):
    return x**2+y**2+z**2+x*y+y*z+z*x

main()

### FIXED CODE ###

import math

L, R, d = map(int,input().split())

ans = 0

for i in range(L,R+1):
    if i % d == 0:
        ans += 1

print(ans)
def main():
    n = int(input())
    v = [int(i) for i in input().split()]
    v_even = v[::2]
    v_odd = v[1::2]
    from collections import Counter
    v_even_cnt = sorted(list(Counter(v_even).items()),key=lambda x:x[1],reverse=True)
    v_odd_cnt = sorted(list(Counter(v_odd).items()),key=lambda x:x[1],reverse=True)
    ans = -1
    if v_even_cnt[0][0] != v_odd_cnt[0][0]:
        ans = len(v_even) - v_even_cnt[0][1] + len(v_odd) - v_odd_cnt[0][1]
    else:
        print(v_even_cnt,v_odd_cnt)
        if v_even_cnt[0][1] < v_odd_cnt[0][1]:
            if len(v_even_cnt) > 1:
                ans = len(v_even) - v_even_cnt[1][1] + len(v_odd) - v_odd_cnt[0][1]
            else:
                ans = len(v_even) - 0 + len(v_odd) - v_odd_cnt[0][1]
        elif v_even_cnt[0][1] > v_odd_cnt[0][1]:
            if len(v_odd_cnt) > 1:
                ans = len(v_even) - v_even_cnt[0][1] + len(v_odd) - v_odd_cnt[1][1]
            else:
                ans = len(v_even) - v_even_cnt[0][1] + len(v_odd) - 0
        else:
            if v_even_cnt[1][1] > v_odd_cnt[1][1]:
                ans = v_even_cnt[0][1] + v_odd_cnt[1][1]
            else:
                ans = v_even_cnt[1][1] + v_odd_cnt[0][1]
    print(ans)
if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    n = int(input())
    v = [int(i) for i in input().split()]
    v_even = v[::2]
    v_odd = v[1::2]
    from collections import Counter
    v_even_cnt = sorted(list(Counter(v_even).items()),key=lambda x:x[1],reverse=True)
    v_odd_cnt = sorted(list(Counter(v_odd).items()),key=lambda x:x[1],reverse=True)
    ans = 0
    if v_even_cnt[0][0] != v_odd_cnt[0][0]:
        ans = len(v_even) - v_even_cnt[0][1] + len(v_odd) - v_odd_cnt[0][1]
    else:
        if len(v_even_cnt) == 1:
            ans = len(v_even)
        else:
            ans1 = len(v_even) - v_even_cnt[0][1] + len(v_odd) - v_odd_cnt[1][1]
            ans2 = len(v_even) - v_even_cnt[1][1] + len(v_odd) - v_odd_cnt[0][1]
            ans = min(ans1,ans2)
    print(ans)
if __name__ == '__main__':
    main()
x,y=map(int,input().split())
if x==1 and y==1:
  print(1000000)
elif x<=3 and y>=4:
  print((x-4)*(-100000))
elif x>=4 and y<=3:
  print((y-4)*(-100000))
elif x<=3 and y<=3:
  peint((x-4)*(-100000)+(y-4)*(-100000))
else:
  print(0)

### FIXED CODE ###

x,y=map(int,input().split())
if x==1 and y==1:
  print(1000000)
elif x<=3 and y>=4:
  print((x-4)*(-100000))
elif x>=4 and y<=3:
  print((y-4)*(-100000))
elif x<=3 and y<=3:
  print((x-4)*(-100000)+(y-4)*(-100000))
else:
  print(0)
n,x=list(map(int,input().split()))
if x==1 or x==2*n-1:
  print("No")
elif x==2*n-2:
  print("Yes")
  for i in range(n-1):
    print(i+1)
  print(x)
  print(2*n-1)
  for i in range(n-1,x-1):
    print(i+1)
else:
  print("Yes")
  l=[i for i in range(1,x-1)]+[i for i in range(x,2*n-3)]
  for i in range(n-1):
    print(l[i]+1)
  print(2*n-1)
  print(x)
  print(1)
  print(2*n-2)
  for i in range(n-1,2*n-3):
    print(l[i]+1)

### FIXED CODE ###

n,x=list(map(int,input().split()))
if x==1 or x==2*n-1:
  print("No")
elif x==2*n-2:
  print("Yes")
  for i in range(n-1):
    print(i+1)
  print(x)
  print(2*n-1)
  for i in range(n-1,x-1):
    print(i+1)
else:
  print("Yes")
  l=[i for i in range(1,x-1)]+[i for i in range(x,2*n-3)]
  for i in range(n-2):
    print(l[i]+1)
  print(2*n-1)
  print(x)
  print(1)
  print(2*n-2)
  for i in range(n-2,2*n-5):
    print(l[i]+1)