Harryxun/stf_run huggingface dataset:
import sys
from itertools import accumulate

def read():
    return sys.stdin.readline().rstrip()

def main():
    n = 10**5
    p = [i % 2 != 0 and i % 3 != 0 and i % 5 != 0 and i % 7 != 0 for i in range(n + 1)]
    p[1] = False
    p[2] = p[3] = p[5] = p[7] = True
    for pi in range(3, int(n ** 0.5) + 1, 2):
        if not p[pi]:
            continue
        for i in range(pi ** 2, n + 1, pi):
            p[i] = False
    like = [i % 2 == 1 and p[i] and p[(i + 1) // 2] for i in range(n)]
    a = list(accumulate(like[1:], initial=0))
    for _ in range(int(read())):
        l, r = map(int, read().split())
        print(a[r] - a[l - 1])

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
from itertools import accumulate

def read():
    return sys.stdin.readline().rstrip()

def main():
    n = 10**5
    p = [i % 2 != 0 and i % 3 != 0 and i % 5 != 0 and i % 7 != 0 for i in range(n + 1)]
    p[1] = False
    p[2] = p[3] = p[5] = p[7] = True
    for pi in range(3, int(n ** 0.5) + 1, 2):
        if not p[pi]:
            continue
        for i in range(pi ** 2, n + 1, pi):
            p[i] = False
    like = [i % 2 == 1 and p[i] and p[(i + 1) // 2] for i in range(n)]
    a = [0] + list(accumulate(like))[1:]
    for _ in range(int(read())):
        l, r = map(int, read().split())
        print(a[r] - a[l - 1])

if __name__ == '__main__':
    main()
N = int(input())
count = 0
c = 0
for i in range(N):
    d1,d2 = input().split()
    if d1==d2:
        count+=1
        if count==3:
            c =1

    else:
        count=0
if c==1:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

S = input()
if S[-1]=='s':
    s = S+'es'
else:
    s = S+'s'
print(s)
N = int(input())
a = sorted(map(int, input().split())) [::-1]
ans = 0
for i in range(0, 3*N, 2):
  ans += a[i+1]
print(ans)

### FIXED CODE ###

N = int(input())
a = sorted(map(int, input().split())) [::-1]
ans = 0
cnt = 0
for i in range(0, 3*N, 2):
  ans += a[i+1]
  cnt += 1
  if cnt == N:
    break
print(ans)
N = int(input())
S = input()

S = [int(s) for s in S]


res = 0
for q in product(range(10), repeat=3):
    i = 0
    for s in S:
        if s==q[i]:
            if i==2:
                res += 1
                break
            else:
                i+=1
print (res)

### FIXED CODE ###

from itertools import product

N = int(input())
S = input()
S = [int(s) for s in S]


res = 0
for q in product(range(10), repeat=3):
    i = 0
    for s in S:
        if s==q[i]:
            if i==2:
                res += 1
                break
            else:
                i+=1
print (res)
print(10-int(input)//200)

### FIXED CODE ###

print(10-int(input())//200)
L, N = list(map(int, input().split()))
S = [str(input()) for _ in range(N)]

#print(S)
S = sorted(S)
#print("sorted", S)

total = ''
for i in range(len(S)):
  total += str(S[i])

print(total)

### FIXED CODE ###

N, L = map(int, input().split())
S = []
for i in range(N):
    line = input()
    S.append(line)
S.sort()
print("".join(S))
T = [int(input()) for _ in range(N)]
T.sort()

def init_bus():
    global bus, min_t, ans
    bus = []
    bus.append(t)
    min_t = t
    ans += 1

min_t = 0
for t in T:
    if len(bus) == 0:
        init_bus()
        continue
    if t - min_t < K and len(bus) < C:
        bus.append(t)
    else:
        init_bus()
print(ans)

### FIXED CODE ###

N, C, K = map(int, input().split(' '))
bus = []
ans = 0
T = [int(input()) for _ in range(N)]
T.sort()

min_t = 0
i = 0
while i < N:
    ans += 1
    start = i
    while i < N and T[i] - T[start] <= K and i - start < C:
        i += 1
print(ans)
num=input()
print(num*num*num)

### FIXED CODE ###

a=int(input())
print(a**3)
a = int(input())
b = True
def hantei(n, x):
  for i in range(n):
    if n % i == 0:
      x = not x
      return x
while b is True:
  hantei(a, b)
  a += 1
  if not b:
    print(a)

### FIXED CODE ###

a = int(input())
def hantei(x):
    k = 0
    for i in range(2, x//2):
        if x % i == 0:
            k += 1
    if k ==0:
        return x

c = True
while c:
    hantei(a)
    b = hantei(a)
    if b is not None:
        print(b)
        c = False
    elif b is None:
        a += 1
S=input()
if S[0]==S[1]:
    if S[2]==S[3] and S[0]!=S[2]:
        print("Yes")
        sys.exit()
elif S[0]==S[2]:
    if S[1]==S[3]:
        print("Yes")
        sys.exit()
elif S[0]==S[3]:
    if S[1]==S[2]:
        print("Yes")
        sys.exit()
print("No")

### FIXED CODE ###

import sys
S=input()
if S[0]==S[1]:
    if S[2]==S[3] and S[0]!=S[2]:
        print("Yes")
        sys.exit()
elif S[0]==S[2]:
    if S[1]==S[3]:
        print("Yes")
        sys.exit()
elif S[0]==S[3]:
    if S[1]==S[2]:
        print("Yes")
        sys.exit()
print("No")
import sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    n = input()
    if n[1] == n[2] or n[2] == n[3] or n[3] == n[4]:
        print("Bad")

    else:
        print("Good")


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    n = input()
    if n[1] == n[2] or n[2] == n[3] or n[1] == n[0]:
        print("Bad")

    else:
        print("Good")


if __name__ == "__main__":
    main()
# ABC 151 C Maze Master
from collections import deque

H, W = map(int, input().split())          
graph = [list(input()) for _ in range(H)]

dy = [0, 1, 0, -1]
dx = [-1, 0, 1, 0]

ans = 0
for si in range(H):
    for sj in range(W):
        if graph[si][sj] == "#": continue
        que = deque()
        que.append([si, sj])

        dist = [[-1 for _ in range(W)] for _ in range(H)]
        dist[si][sj] = 0
        
        while que:
            y, x = que.popleft()

            for dir in range(4):
                ny = y + dy[dir]
                nx = x + dx[dir]
                if ny < 0 or ny >= H or nx < 0 or nx >= W: continue
                if graph[ny][nx] == "#":continue

                if graph[ny][nx] == "." and dist[ny][nx] == -1:
                    dist[ny][nx] = dist[y][x] + 1
                    que.append([ny, nx])

    for i in range(H):
        for j in range(W):
            if dist[i][j] == -1: continue
            ans = max(ans, dist[i][j])

print(ans)


### FIXED CODE ###

# ABC 151 C Maze Master
from collections import deque

H, W = map(int, input().split())          
graph = [list(input()) for _ in range(H)]

dy = [0, 1, 0, -1]
dx = [-1, 0, 1, 0]

ans = 0
for si in range(H):
    for sj in range(W):
        if graph[si][sj] == "#": continue
        que = deque()
        que.append([si, sj])

        dist = [[-1 for _ in range(W)] for _ in range(H)]
        dist[si][sj] = 0
        
        while que:
            y, x = que.popleft()

            for dir in range(4):
                ny = y + dy[dir]
                nx = x + dx[dir]
                if ny < 0 or ny >= H or nx < 0 or nx >= W: continue
                if graph[ny][nx] == "#": continue
                if dist[ny][nx] != -1: continue

                if graph[ny][nx] == ".":
                    dist[ny][nx] = dist[y][x] + 1
                    que.append([ny, nx])

        for i in range(H):
            for j in range(W):
                if dist[i][j] == -1: continue
                ans = max(ans, dist[i][j])

print(ans)
N = R - L + 1
l = L % 2019

if N >= 2019:
    print(0)
    exit()

m = 2018
for i in range(N):
    a = (l + i) % 2019
    if a < m:
        m = a

print(m * (m + 1))

### FIXED CODE ###

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

m1 = 2018
for i in range(L, R):
    for j in range(L+1, R+1):
        a = (i*j) % 2019
        if a == 0:
            print(0)
            exit()
        if a < m1:
            m1 = a
print(m1)
n = int(input())
for i in range(1,10):
  for i in range(1,10):
    if i*j == n:
      print('Yes')
      exit()
print('No')  


### FIXED CODE ###

n = int(input())

for i in range(1,10):
  if n%i == 0:
    if int(n/i) <= 9:
      print('Yes')
      exit()
      
print('No')
import math
n=int(input())
xli=list(map(int,input().split()))
yli=list(map(int,input().split()))
a=0
b=0
c=0
d=0

for x,y in zip(xli,yli):
    base = math.fabs(x,y)
    a += base
    b += base**2
    c += base**3
    if d < base : d = base

print(a)
print(b**(1/2))
print(c**(1/3))
print(d)

### FIXED CODE ###

import math
n=int(input())
xli=list(map(float,input().split()))
yli=list(map(float,input().split()))
a=0
b=0
c=0
d=0
 
for x,y in zip(xli,yli):
    base = math.fabs(x-y)
    a += base
    b += base**2
    c += base**3
    if d < base : d = base
 
print(a)
print(b**(1/2))
print(c**(1/3))
print(d)
N,M=map(int,input().split())
S=[]
C=[]
for i in range(M):
  s,c=map(int,input().split())
  S+=[s]
  C+=[c]
tf=1
ans=[]
for i in range(N):
  ans+=[-1]
for i in range(M):
  if ans[S[i]-1] ==-1:
    ans[S[i]-1]=C[i]
  else:
    if ans[S[i]-1]!=C[i]:
      tf=0
      break
    else:
      continue
for i in range(N):
  if ans[i]==-1:
    if i!=0 or (i==0 and N==1):
      ans[i]=0
    else:
      ans[i]=1
  elif ans[i]==0 and i==0 and N!=1:
    tf=0
    break
if tf==0:
  print('-1')
else:
  ansnum=''
  for i in range(N):
    ansnum+=str(ans[i])
  print(ansnum)

### FIXED CODE ###

N=int(input())
print(N//2+N%2)
x,y=input().split()
if x<y:c='<'
else if x>y:c='>'
else: c='='
print(c)

### FIXED CODE ###

x,y=input().split()
if x<y:c='<'
elif x>y:c='>'
else: c='='
print(c)
N, M = map(int, input().split())
H = list(map(int, input().split()))
preH = [0 for i in range(N)]

for i in range(M):
    preH.append(list(map(int, input().split())))
ans = [True]*N

for i in range(M):
    A,B = preH[i] #一行ずつ処理

    if(H[A-1]>=H[B-1]):
        ans[A-1] = False
    if(H[B-1]>=H[A-1]):
        ans[B-1] = False

print(ans.count(True))

### FIXED CODE ###

N, M = map(int, input().split())
H = list(map(int, input().split()))
preH =[]
for i in range(M):
    preH.append(list(map(int, input().split())))
ans = [True]*N

for i in range(M):
    A,B = preH[i]


    if(H[A-1]<=H[B-1]):
        ans[A-1] = False
    if(H[B-1]<=H[A-1]):
        ans[B-1] = False

print(ans.count(True))
import itertools as it
T,F = True,False

while 1:
    s = raw_input()
    if s == "#": break
    for b,a in zip(["=","->","*","+","-"],[" == "," <= "," and "," or "," not "]):
        s = s.replace(b,a)
    
    for v in xrange(2**11):
        a,b,c,d,e,f,g,h,i,j,k = map(int,list(format(v,"b").zfill(11)))
        if not eval(s):
            print "NO"
            break
    else:
        print "YES"

### FIXED CODE ###

T,F = True,False
while 1:
    s = raw_input()
    if s == "#": break
    for i in xrange(100): s = s.replace("--","")
    for b,a in zip(["=","->","-","*","+"],[") == ("," != 1 or "," not "," and "," or "]):
        s = s.replace(b,a)
    s = "("+s+")"
    for v in xrange(2**11):
        a,b,c,d,e,f,g,h,i,j,k = map(int,list(format(v,"b").zfill(11)))
        if not eval(s):
            print "NO"
            break
    else:
        print "YES"
n,a,b = map(int, input().split())

if (b-a)%2 == 1:
    print(Borys)
else:
    print(Alice)

### FIXED CODE ###

l = sorted(list(map(int,input().split())))

a = abs(l[0]-l[1])%2
b = abs(l[1]-l[2])%2
c = abs(l[0]-l[2])%2

if a==0:
    if b==0:
        ans = (l[2]-l[0] + l[2]-l[1]) /2
    else:
        ans = 1 + (l[2]-(l[0]+1) + l[2]-(l[1]+1))/2
else:
    if b==0:
        ans = 1 + ((l[2]+1)-l[0] + (l[2]+1)-(l[1]+1))/2
    else:
        ans = 1 + ((l[2]+1)-(l[0]+1) + (l[2]+1)-l[1])/2
print(int(ans))
a = input()
num=0
b=[]
for i in a:
  　　　　if i in 'ATGC':
    　　　　　　　num+=1
  　　　　else:
    　　　　　　　b.append(num)
    　　　　　　　num=0
print(max(b))
    

### FIXED CODE ###

a = input()+"a"
num=0
b=[]
for i in a:
  if i in 'ATGC':
    num+=1
  else:
    b.append(num)
    num=0
print(max(b))
n,m=map(int,input().split())
count=0
for j in range(1,n+1):
  for i in range(m):
    l,r=map(int,input().split())
    if l<=j:
      if j<=r:
        count+=1
print(count)

### FIXED CODE ###

n,m=map(int,input().split())
listl=[]
listr=[]
for i in range(m):
  l,r=map(int,input().split())
  listl.append(l)
  listr.append(r)
maxl=max(listl)
minr=min(listr)
if minr-maxl+1>=1:
  print(minr-maxl+1)
else:
  print(0)
from numpy import*;print(sum(arange(int(input())+1)[i%3>0<i%5]))

### FIXED CODE ###

print(sum(i%3>0<i%5and i for i in range(int(input())+1)))
n = int(input())
s, t = input().split()
ans = ""
for i in range(n):
  ans += s[i] + t[i]
print(ans)

### FIXED CODE ###

A = int(input())
B = int(input())
 
print(6-A-B)	#和から誤答を引けば正答
from functools import lru_cache

S = input()

DEVIDER = 10**9 + 7


def add(a, b):
    return (a + b) % DEVIDER

def mul(a, b):
    return (a % DEVIDER) * (b % DEVIDER) % DEVIDER

@lru_cache(maxsize=32)
def check(s, j):
    if j == 0 and s == 'A':
        return True
    if j == 1 and s == 'B':
        return True
    if j == 2 and s == 'C':
        return True
    return False


@lru_cache()
def dp(i, j):
    if i == len(S) and j == 3:
        # end of task
        return 1
    elif i == len(S) and j < 3 :
        # fail
        return 0
    elif i < len(S) and j == 3:
        # next
        if S[i] == "?":
            return mul(3,  dp(i + 1, 3))
        else:
            return dp(i + 1, 3)
    else:
        # i < len(S) and j < 3
        if S[i] == "?":
            return add(mul(3, dp(i + 1, j)),  dp(i + 1, j + 1))
        if check(S[i], j):
            return add(dp(i + 1, j), dp( i + 1, j + 1))
        return dp(i + 1, j)


ret = dp(0, 0)
print(ret)





### FIXED CODE ###

import sys

S = input()

DEVIDER = 10**9 + 7


def add(a, b):
    return (a + b) % DEVIDER

def mul(a, b):
    return (a % DEVIDER) * (b % DEVIDER) % DEVIDER

cache = [[0 for _ in range(4)] for _ in range(len(S) + 1)]
cache[0][0] = 1


def check(s, j):
    if j == 0 and s == 'A':
        return True
    if j == 1 and s == 'B':
        return True
    if j == 2 and s == 'C':
        return True
    return False


for i in range(len(S)):
    for j in range(4):
        if S[i] == '?':
            cache[i + 1][j] += 3 * cache[i][j]
        else:
            cache[i + 1][j] += cache[i][j]
        if j > 0:
            if check(S[i], j-1) or S[i] == '?':
                cache[i+1][j] += cache[i][j - 1]
        cache[i+1][j] %= DEVIDER

print(cache[len(S)][3])
#coding: utf-8

inputN, inputK = map(int, input().split())
inputA = list(map(int, input().split()))
minNumber = inputN
minPos = 0

if inputN == inputK:
    print (1)
elif inputN <= (inputK-1)*2 + 1:
    print (2)
elif inputN <= (inputK-1)*3 + 1:
    print (3)
elif inputN <= (inputK-1)*4 + 1:
    print (4)
elif inputN <= (inputK-1)*5 + 1:
    print (5)
else:
    for i in range(len(inputA)):
        if inputA[i] < minNumber:
            minNumber = inputA[i]
            minPos = i

    splitNumber = (inputN + 1) / (inputK - 1)
    print (int(splitNumber))



### FIXED CODE ###

#coding: utf-8

counter = 0
inputStr = input()

strA = "+"
strB = "-"

for i in range(1, 5):
    if inputStr[i-1:i] == strA:
        counter += 1
    else:
        counter -= 1

print (counter)
N=int(input())
X=input()
num_X = int(X, base=2)
pop_xi = [0]*N
pop_x = X.count("1")
X_pop_res = [0]*N

mod1 = pop_x - 1
mod0 = pop_x + 1
res1 = num_X % (mod1)
res0 = num_X % (mod0)

# for i in range(N):
#     if X[i]=="1":
#         pop_xi[i] = mod1
#         X_pop_res[i] = res1
#     else:
#         pop_xi[i] = mod0
#         X_pop_res[i] = res0
pops = [0]*(N+20)
for i in range(N):
    tmp = 0
    if X[i] == "0":
        # +
        tmp = (res0 + pow(2, N-i-1, mod0))%mod0
    else:
        tmp = (res1 - pow(2, N-i-1, mod1))%mod1
    
    if tmp == 0:
        print(1)
        continue
    cnt = 1
    while tmp != 0:
        if not pops[tmp]:
            pop = bin(tmp).count("1")
        else:
            pop = pops[tmp]

        tmp %= pop
        cnt += 1
    print(cnt)

### FIXED CODE ###

N=int(input())
X=input()
num_X = int(X, base=2)
pop_x = X.count("1")
if pop_x <= 1:
    mod0 = pop_x + 1
    res0 = num_X % mod0
else:
    mod1 = pop_x - 1
    mod0 = pop_x + 1
    res1 = num_X % (mod1)
    res0 = num_X % (mod0)

# pops = [0]*(N+20)
for i in range(N):
    tmp = 0
    if X[i] == "0":
        # +
        tmp = (res0 + pow(2, N-i-1, mod0))%mod0
    else:
        if pop_x == 1:
            print(0)
            continue
        tmp = (res1 - pow(2, N-i-1, mod1))%mod1
    
    if tmp == 0:
        print(1)
        continue
    cnt = 1
    while tmp != 0:
        pop = bin(tmp).count("1")
        tmp %= pop
        cnt += 1
    print(cnt)
def main():
    a,b = map(int, input().split())
    if a>=13:
        print(b)
    elif 6<=a<=12:
        print(int(b/2)
    else:
        print(0)
main()

### FIXED CODE ###

def main():
    a,b = map(int, input().split())
    if a>=13:
        print(b)
    elif 6<=a<=12:
        print(int(b/2))
    else:
        print(0)
main()
import math

N, K = list(map(int, input().split()))
MOD = 10**9+7

for i in range(1,K+1):
    ans = math.factorial(N-K+1) // (math.factorial(N-K-i+1) * math.factorial(i)) * math.factorial(K-1) // (math.factorial(K-i) * math.factorial(i-1))% MOD
    print(ans)


### FIXED CODE ###

import math

N, K = list(map(int, input().split()))
MOD = 10**9+7
i = 1
ans = math.factorial(N-K+1) // (math.factorial(N-K-i+1) * math.factorial(i)) * math.factorial(K-1) // (math.factorial(K-i) * math.factorial(i-1)) % MOD

for i in range(1,K+1):
    if i <= N-K+1:
        ans = math.factorial(N-K+1) // (math.factorial(N-K-i+1) * math.factorial(i)) * math.factorial(K-1) // (math.factorial(K-i) * math.factorial(i-1)) % MOD
    else:
        ans = 0
    print(ans)
from collections import *
n,m = map(int,input().split())
par = [-1 for _ in range(n)]#par<0なら自身が親で要素の個数、>0なら子で親の位置示す

def root(i):
    if par[i] < 0:
        return i
    else:
        return root(par[i])

def size(a):
    return -par[root(a)]

def union(a,b):
    a = root(a)
    b = root(b)
    if a == b:#親が等しい
        return False
    if size(a) < size(b):#サイズが大きい方に繋げる
        a,b = b,a
    par[a] += par[b]
    par[b] = a
    return True

for i in range(m):
    a = [int(j)-1 for j in input().split()]#数字を一つ減らして足を揃える
    if root(a[0]) != root(a[1]):
        union(a[0],a[1])
par = [ i for i in par if i > 0]
print(Counter(par).most_common()[0][1]+1)

### FIXED CODE ###

from collections import deque

n,m = map(int,input().split())
graph = [[] for _ in range(n+1)]
for _ in range(m):
    a,b = map(int,input().split())
    graph[a].append(b)
    graph[b].append(a)
ans = 1

def dfs(node):
    while len(todo) > 0:
        node = todo.pop()
        if tf[node] == 0:
            tf[node] = 1
            seen.add(node)
            for nextnode in graph[node]:
                todo.append(nextnode)

todo = deque()
done = set()
tf = [0 for _ in range(n+1)]
for i in range(1,n+1):
    if i in done:
        continue
    else:
        todo.append(i)
        seen = set()
        dfs(i)
        #print(i,seen)
        ans = max(ans,len(seen))
        done |= seen
print(ans)
s=input()
print("Yes" if (sorted(s[:2])==sorted(s[2:]) and len(sorted(s[:2))==2) else "No")


### FIXED CODE ###

s=input()
if len(set(s))==2 and s.count(s[0])==2:
    print("Yes")
else:
    print("No")
from bisect import bisect_left
import sys
X,N=list(map(int,input().split()))
if N==0:
    print(X)
    sys.exit()
P=list(map(int,input().split()))
P=sorted(P)
x=bisect_left(P,X)
if P[x]!=X:
    print(X)
    sys.exit()

A=X
B=X

while True:
    A-=1
    B+=1
    x1=bisect_left(P,A)
    x2=bisect_left(P,B)
    if P[x1]!=A:
        print(A)
        break
    if P[x2]!=B:
        print(B)
        break
        

### FIXED CODE ###

from bisect import bisect_left
import sys
X,N=list(map(int,input().split()))
if N==0:
    print(X)
    sys.exit()
P=list(map(int,input().split()))
P=sorted(P)
x=bisect_left(P,X)
if x>=len(P):
    print(X)
    sys.exit()
if P[x]!=X:
    print(X)
    sys.exit()
A=X
B=X
while True:
    A-=1
    B+=1
    x1=bisect_left(P,A)
    x2=bisect_left(P,B)
    if x1<len(P) and P[x1]!=A:
        print(A)
        break
    if x2<len(P) and P[x2]!=B:
        print(B)
        break
    if x2==len(P):
        print(B)
        break
, x = map(int, input().split())
l = [int(i) for i in input().split()] 

d = 0
i = 0
if x > 0:
    while d <= x:
        d = d + l[i]
        i = i + 1
        if i >= n:
            i = i + 1
            break
    print(i)
elif x <= 0:
    print(1)

### FIXED CODE ###

n, x = map(int, input().split())
l = [int(i) for i in input().split()] 

d = 0
i = 0
if x > 0:
    while d <= x:
        d = d + l[i]
        i = i + 1
        if i >= n:
            break
    if d > x:
        print(i)
    elif d <= x:
        print(n+1)
elif x <= 0:
    print(1)
N = int(input())
W = []
w_dic = dict()
for i in range(N):
    W.append(input())

check = True
for i in range(N-1):
    if W[i][-1] == W[i+1][0]:
        continue
    else:
        check = False
        break
for i in range(N):
    if W[i] in w_dic:
        check = False
    else:
        w_dict[W[i]] = 1
if check:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

N = int(input())
W = []
w_dic = dict()
for i in range(N):
    a = input()
    W.append(a)

check = True
for i in range(N-1):
    s = W[i]
    s_1 = W[i+1]
    if s[-1] == s_1[0]:
        continue
    else:
        check = False
        break
for i in range(N):
    if W[i] in w_dic:
        check = False
        break
    else:
        w_dic[W[i]] = 1
if check:
    print('Yes')
else:
    print('No')
a=int(input())
b=int(input())
l=[1,2,3]
l.pop(a-1)
l.pop(b-1)
print(*l)

### FIXED CODE ###

a=int(input())
b=int(input())
l=[1,2,3]
l[a-1]=0
l[b-1]=0
print(sum(l))
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

"""
列ベクトルが M 個ある
いくつかを選ぶ（和をとる）→すべての行が0となる選び方：0、その他：2^{N-1}通り
列ベクトル空間の生成する次元：d次元
ans = 2^{N-1} * (2^M - 2^[M-d})
= 2^{N+M-1} * (1-2^{-rank})
"""

import numpy as np
MOD = 998244353
N,M = map(int,input().split())
A = np.array([[int(x) for x in input().split()] for _ in range(N)])

def rank(A):
    # F_2 上の行列のrank
    N,M = A.shape
    if N == 0 or M == 0:
        return 0
    nz = np.nonzero(A[0])[0]
    if len(nz) == 0:
        # first col = zero
        return rank(A[1:])
    i = nz[0]
    # swap
    temp = A[:,i].copy()
    A[:,i] = A[:,0]
    A[:,0] = temp
    # (0,0) 成分が 1 になった。行基本変形。
    A ^= A[0] * A[:,0]
    return 1 + rank(A[1:,1:])

d = rank(A)
answer = pow(2,N+M-1,MOD) * (1 - pow(2,(-d)%(MOD-1), MOD)) % MOD
print(answer)



### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

"""
列ベクトルが M 個ある
いくつかを選ぶ（和をとる）→すべての行が0となる選び方：0、その他：2^{N-1}通り
列ベクトル空間の生成する次元：d次元
ans = 2^{N-1} * (2^M - 2^[M-d})
= 2^{N+M-1} * (1-2^{-rank})
"""

import numpy as np
MOD = 998244353
N,M = map(int,input().split())
A = np.array([[int(x) for x in input().split()] for _ in range(N)])

def rank(A):
    # F_2 上の行列のrank
    N,M = A.shape
    if N == 0 or M == 0:
        return 0
    nz = np.nonzero(A[0])[0]
    if len(nz) == 0:
        # first col = zero
        return rank(A[1:])
    i = nz[0]
    # swap
    temp = A[:,i].copy()
    A[:,i] = A[:,0]
    A[:,0] = temp
    # (0,0) 成分が 1 になった。行基本変形。
    A ^= A[0][None,:] * A[:,0][:,None]
    return 1 + rank(A[1:,1:])

d = rank(A)
answer = pow(2,N+M-1,MOD) * (1 - pow(2,(-d)%(MOD-1), MOD)) % MOD
print(answer)
from functools import lru_cache

N, M = map(int, input().split())
b = tuple([int(input()) for i in range(M)])

mod = 10**9+7

@lru_cache(maxsize=None)
def Fib(n, a):
    if n-2 in a:
        return 0
    elif n == 1:
        return 0
    elif n == 2:
        return 1
    else:
        return (Fib(n-1, a) + Fib(n-2, a)) % mod

print(Fib(N+2, b))

### FIXED CODE ###

N, M = map(int, input().split())
#A = [int(input()) for i in range(M)]
flag = [0]*N
for i in range(M):
    flag[int(input())-1] = 1
#A = [i*3 for i in range(N//3)]
#for i in range(N//3):
    #flag[i] = 1

mod = 10**9+7

dp = [0] * N

if flag[0]==0:
#if 1 not in A:
    dp[0] = 1
    if N>1:
        if flag[1]==0:
    #if (2 not in A) and N > 1:
            dp[1] = 2
elif N > 1:
    if flag[1]==0:
    #if 2 not in A:
        dp[1] = 1
    else:
        dp[1] = 0

loop = []
'''
for i in range(2, N):
    if i not in A:
        loop.append(i)
'''
for i in range(2, N):
    if flag[i]==0:
        dp[i] = (dp[i-2] + dp[i-1]) % mod
        #dp[i] = (sum(dp[i-2:i])) % mod

print(dp[N-1])
#print(dp)
N=input();A=input()
print(N*N-A)

### FIXED CODE ###

N=int(input());A=int(input())
print(N*N-A)