peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
from itertools import zip_longest
s1=input()
s2=input()
ans=''
for ss1,ss2 in zip_longest(s1,s2):
  if ss1 == None:
    ss1=''
  if ss2 == None:
    ss2=''
  ans+=ss1+ss2
  
print(ans)
# Judge status: Accepted
s = input()
ans = 1
if s[0] != 'A':
    ans = 0
if not 'C' in s[2:-1]:
    ans = 0
cnt = 0
for i in s:
    if i in [chr(i) for i in range(65, 65+26)]:
        cnt += 1
if cnt != 2:
    ans = 0
if ans == 1:
    print('AC')
else:
    print('WA')
# Judge status: Wrong Answer
s = input()
t = input()
l = len(t)

for i in range(l):
    print(t[i:])
    if t[i:] in s:
        a = i
        break
else:
    a = l

for j in range(1, l):
    print(t[:l-j])
    if t[:l-j] in s:
        b = j
        break
else:
    b = l

print(min(a, b))
# Judge status: Accepted
n,k = map(int,input().split(" "))
r,s,p = map(int,input().split(" "))
ar = list(input())
count = 0
for i in range(n):
    if i - k >= 0 and ar[i] == ar[i-k]:
        ar[i] = "."
    else:
        if ar[i] == 'r':
            count += p
        elif ar[i] == 's':
            count += r
        elif ar[i] == 'p':
            count += s
print(count)
# Judge status: Wrong Answer
a,b=map(int,input().split())
x=int(str(a)*b)
y=int(str(b)*a)
print(min(x,y))
# Judge status: Accepted
n = int(input())
ans = 0
count = 0

for i in range(1,n+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            count += 1
    if count == 8:
        ans += 1
    count = 0

print(ans)
# Judge status: Accepted
# C XYZ Triplets

n = int(input())

ans = {}
for x in range(1, 99):
  for y in range(1, 99):
    for z in range(1, 99):
      k = (x+y)**2+(y+z)**2+(z+x)**2
      if k > 20000:
        break
      if k % 2 == 0:
        if not k//2 in ans:
          ans[k//2] = 1
        else:
          ans[k//2] += 1

for i in range(1, n+1):
  if i in ans:
    print(ans[i])
  else:
    print(0)
# Judge status: Accepted
from heapq import heappop, heapify, heappush
from collections import defaultdict
N, M = map(int,input().split())
d = defaultdict(list)
for i in range(N):
    a, b = map(int, input().split())
    d[a].append(b)
h = []
ans = 0
for i in range(1, M+1):
    if len(d[i]) != 0:
        for x in d[i]:
            heappush(h, -x)
    if len(h) != 0:
        ans -= heappop(h)
print(ans)
# Judge status: Accepted
N, = map(int, input().split())
rs = []
for i in range(N):
    s, a = input().split()
    a = int(a)
    rs.append((i+1, s, -a))
rs.sort(key=lambda x : (x[1], x[2]))
for i, s, a in rs:
    print(i)
# Judge status: Accepted
S = input()
Sint = int(S[:4])*10000 + int(S[5:7])*100 + int(S[8:])
if Sint > 20190430:
    print('TBD')
else:
    print('Heisei')
# Judge status: Accepted
s = input()

s2 = s.replace('?','D')
print(s2)
# Judge status: Wrong Answer
for i in range(1, 366):
  print(i % 26)
# Judge status: Accepted
def main():
    N = int(input())
    C = input()
    l, r = 0, N - 1
    c = 0
    while True:
        while l < r and C[l] == 'R':
            l += 1
        while l < r and C[r] == 'W':
            r -= 1
        if l >= r:
            break
        c += 1
        l += 1
        r -= 1

    return c

print(main())
# Judge status: Accepted
n = int(input())
s = input()
ans = s.count('R') * s.count('G') * s.count('B')

for i in range(n):
    for j in range(i+1, n):
        k = j + (j - i)
        if j < k < n and s[i] != s[j] and s[j] != s[k] and s[i] != s[k]:
            ans -= 1

print(ans)
# Judge status: Accepted
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

sum_a = sum(A)
sum_b = 0
b_next_ind = 0
ans = 0

# 下からi冊減らす; i=0..N
for i in range(N + 1):
	sum_b_max = K - sum_a
	if sum_b_max >= 0:
		while b_next_ind < M and sum_b + B[b_next_ind] <= sum_b_max:
			sum_b += B[b_next_ind]
			b_next_ind += 1
		ans = max(ans, (N - i) + b_next_ind)
	sum_a -= A[N - 1 - i]

print(ans)
# Judge status: Wrong Answer
N = int(input())
ans = 0
for i in range(N):
  if i % 3 != 0 or i % 5 != 0:
    ans += i
print(ans)
# Judge status: Accepted
import datetime
s = input().split("/")
if datetime.date(2019,4,30) >= datetime.date(int(s[0]), int(s[1]), int(s[2])):
    print('Heisei')
else:
    print('TBD')
# Judge status: Wrong Answer
x, y, z = map(int, input().split())
t = 0
for i in range(x,y+1,1):
  if i % 2 == 0:
    t += 1
print(t)
# Judge status: Wrong Answer
from math import sqrt

n,d = map(int,input().split())
li  = [list(map(int,input().split())) for i in range(n)]
tmp = 0
ans = 0

for i in range(n):
  for j in range(d):
    if i==n-1:
      tmp += pow(abs(li[i][j]-li[0][j]),2)
    else:
      tmp += pow(abs(li[i][j]-li[i+1][j]),2)
  if sqrt(tmp)%1==0:
    ans += 1
  tmp =  0

print(ans)
# Judge status: Accepted
mod=pow(10,5)+2
N=int(input())
num=[0]*mod
ans=0
A=list(map(int, input().split()))
for i in range(N):
    num[A[i]]+=1
    ans+=A[i]
Q=int(input())
for i in range(Q):
    B,C=map(int, input().split())
    cnt=num[B]
    num[C]+=num[B]
    num[B]=0
    ans+=(C-B)*cnt
    print(ans)
# Judge status: Accepted
import collections
N, M = map(int, input().split())
G = collections.defaultdict(list)
for _ in range(M):
    a, b = map(int, input().split())
    G[a].append(b)
    G[b].append(a)

dist = [-1] * (N + 1)
que = collections.deque()
 
dist[1] = 0
que.append(1)
 
while len(que):
    v = que.popleft()
    for nv in G[v]:
        if dist[nv] != -1:
            continue
        dist[nv] = v
        que.append(nv)
if -1 in dist[2:]:
    print('No')
else:
    print('Yes')
    for value in dist[2:]:
        print(value)
# Judge status: Accepted
from math import sqrt

S=int(input())
if S==10**18:
    print(10**9,0,0,10**9,0,0)
else:
    q=int(sqrt(S))
    test=q*(q+1)-S
    if test>=0:
        print(0,0,q,1,test,q+1)
    else:
        print(0,1,q+1,0,-test,q+1)
# Judge status: Accepted
l =['Christmas'] + ['Eve']*(25-int(input()))
print(*l)
# Judge status: Wrong Answer
N = int(input())
P = list(map(int,input().split()))
count = 1

for i in range(1, N):
  isbreak = False
  for j in range(0,i):
    print(P[i])
    print(P[j])
    if (P[i] > P[j]):
      isbreak = True
      break
  if isbreak == False:
    count += 1
    
print(count)
# Judge status: Accepted
def main():
    x, y = map(int, input().split())
    print(min(abs(x+y), abs(~x+y))+1)
if __name__ == '__main__':
    main()
# Judge status: Accepted
s = input()
t = input()

s = s[::-1]
t = t[::-1]

for i in range(len(s) - len(t) + 1):
    for j, v in enumerate(t):
        if s[j+i] == v or s[j+i] == "?":
            continue
        else:
            break
    else:
        l = len(t)
        s = s[0:i] + t + s[i+l:]
        break
else:
    print("UNRESTORABLE")
    exit()

s = s.replace("?", "a")

print(s[::-1])
# Judge status: Accepted
import math
a, b = map(int, input().split())

for i in range(1001):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        exit(0)

print(-1)
# Judge status: Accepted
n, l = map(int, input().split())
p_list = [l + i - 1 for i in range(1, n+1)]
s = sum(p_list)
if l <= 0 and l >= 1 - n: print(s)
elif l < 1 - n: print(s - p_list[-1])
else: print(s - p_list[0])
# Judge status: Wrong Answer
S = input()
if S[-1] == 'e':
    print(S+'s')
else:
    print(S+'es')
# Judge status: Wrong Answer
x,a,b=map(int,input().split())

if a>=b:
    print("delicious")
elif x+a<=b:
    print("dangerous")
else:
    print("safe")
# Judge status: Accepted
N = int(input())
P = list(map(int, input().split()))
count = 0
mini = P[0]
for p in P:
    if p <= mini:
        count += 1
    mini = min(mini, p)
print(count)
# Judge status: Accepted
K,N = map(int, input().split())
house = [int(i) for i in input().split()]

answer = [0]

for index, i in enumerate(house):
  if i == house[-1]:
    X = (K - i) + house[0]
    answer.append(X)
  else:
    X = house[index + 1] - i
    answer.append(X)
print(K - max(answer))
# Judge status: Accepted
ans=10**10
n=int(input())
a=list(map(int,input().split()))
for i in range(-100,101):
  x=0
  for j in range(n):
    x+=(i-a[j])**2
  ans=min(x,ans)
print(ans)
# Judge status: Accepted
A, B = map(int,input().split())
if A > 12:
    print(B)
elif A > 5 and A < 13:
    print(int(B/2))
elif A < 6:
    print(0)
# Judge status: Wrong Answer
A, B, C = map(int, input().split())
print(min(A*C, B//A))
# Judge status: Accepted
X, K, D = map(int, input().split())
X = abs(X)
D = abs(D)
if X > K * D:
    X = X - K*D
else:
    quo = X//D
    X = X - D*quo
    res = K - quo
    if res % 2 == 1:
        X = X - D
    else:
        pass

print(abs(X))
# Judge status: Accepted
s=input()
k=int(input())
ans="1"
for i in range(k):
  if (int(s[i])!=1):
    ans=s[i]
    break
print(ans)
# Judge status: Wrong Answer
import sys

input = sys.stdin.readline

def main():
    N, K, Q = map(int, input().split())
    a = [0]*N
    for _ in range(Q):
        a[int(input())-1] += 1
    print(a)
    for i in range(N):
        if a[i] - Q + K > 0:
            print('Yes')
        else:
            print('No')

if __name__ == '__main__':
    main()
# Judge status: Accepted
x = int(input())
y = sorted(list(map(int,input().split())))
l = 0
for i in range(x-1):
  l += y[i]
#print(l)
if y[x-1] < l:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
P, Q, R = map(int, input().split())
print(min(P+Q, Q+R, R+Q))
# Judge status: Accepted
MOD = 10 **9 + 7

n,a,b = map(int,input().split())

all = pow(2,n,MOD)
if all:# not 0
  all -=1

for i in (a,b):
  sub = 1
  for j in range(i):
    sub *= n-j
    sub %= MOD
    sub *= pow(j+1,MOD-2,MOD)
    sub %= MOD
  all -= sub
  if all < 0:
    all += MOD
print(all)
# Judge status: Accepted
N = int(input())

A = list(map(int, input().split()))
B = list(map(int, input().split()))

ans = 0
for i in range(N):
    if A[i] > B[i]:
        ans += B[i]
    else:
        ans += (A[i] + (A[i+1] - max(A[i+1] - (B[i]-A[i]), 0)))
        A[i+1] = max(A[i+1] - (B[i]-A[i]), 0)

print(ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

cnt = 0

for i in range(n):
    t = min(a[i], b[i])
    cnt += t
    a[i] -= t
    b[i] -= t

    s = min(a[i+1], b[i])
    cnt += s
    a[i] -= s
    b[i] -= s

print(cnt)
# Judge status: Accepted
#python3
def main():
    s = input()
    A_index = s.index('A')
    t = [i for i in reversed(s)]
    Z_index = len(s) - t.index('Z') - 1

    if Z_index - A_index >= 0:
        print(Z_index - A_index + 1) 

main()
# Judge status: Accepted

import itertools


n, m, q = map(int, input().split())
query = []
for i in range(q):
    query.append(list(map(int, input().split())))

choices = list(itertools.combinations_with_replacement([i for i in range(1, m+1)], n))
ans = -1
for choice in choices:
    score = 0
    for q in query:
        if choice[q[1]-1] - choice[q[0]-1] == q[2]:
            score += q[3]
    ans = max(ans, score)
print(ans)
# Judge status: Wrong Answer
n,a,b = map(int, input().split())
if (b-a)%2 == 0:
  print((b-a)//2)
else:
  print(b-1)
# Judge status: Wrong Answer
n, p = map(int, input().split())
a = list(map(int,input().split()))

odd = []
even = []
for i, aa in enumerate(a):
    if aa % 2 == 0:
        even.append(aa)
    else:
        odd.append(aa)
e = len(even)
o = len(odd)
ans = 2 ** e
od_list = [0]
bunsi = 1
bunbo = 1

for i in range(1,o):
    bunsi *= o - i + 1
    bunbo *= i
    od_list.append(bunsi//bunbo)
even_i = od_list[::2]
odd_i = od_list[1::2]
if p == 0:
    print(ans * sum(even_i))
else:
    print(ans * sum(odd_i))
# Judge status: Accepted
A,B=map(int,input().split())
M=max(A,B)
if M>8:
  print(':(')
else:
  print('Yay!')
# Judge status: Accepted
x = list(map(int, input().split()))
count = 0
l = []
for i in range(1, x[0]+1):
  tmp = x[1] + i - 1
  l.append(tmp)
if (0 in l) == True:
  for i in l:
    count += i
else:
  if l[0] > 0:
    for i in l[1:]:
      count += i
  else:
    for i in l[:-1]:
      count += i
print(count)
# Judge status: Wrong Answer
s=int("".join(map(str,input().split())))

i=1
while i<s:
    if s==i*2:
        print("Yes")
    else:
         i=i+1

else:
    print("No")
# Judge status: Wrong Answer
h,n=map(int,input().split())
m=[[0,0,0] for _ in range(n)]
L=100000000000
mina=1000000
minb=1000000
for i in range(n):
  a,b=map(int,input().split())
  m[i]=[a,b]
  if b<minb:
    minb=b
    mina=a
dp=[L for _ in range(h+1)]
dp[0]=0
for i in range(1,h+1):
  for j in range(n):
    [a,b]=m[j]
    if i>=a:
      dp[i]=min(dp[i-a]+b,dp[i])





print(dp[-1])
# Judge status: Accepted
list_S = list(input())
ans = "WA"
if list_S[0] == "A":
    list_S.remove("A")
    if "C" in list_S[1:-1]:
        list_S.remove("C")
        for c in list_S:
            if c not in ["q","a","z","w","s","x","e","d","c","r","f","v","t","g","b","y","h","n","u","j","m","i","k","o","l","p"]:
                ans = "WA"
                break
            else:
                ans = "AC"

print(ans)
# Judge status: Accepted
N = int(input())
S = input()
T = input()
answer = 2*N
for i in range(N):
  if S[N-i-1:] == T[:i+1]:
    answer = 2*N-i-1
print(answer)
# Judge status: Accepted
import math
from decimal import *

def cnt_prime(p, n):
    div = Decimal(str(n))
    s = 0

    while True:
        div /= p
        if div < 1:
            break
        if p == 2:
            s += int(div.quantize(Decimal('0.0'), rounding=ROUND_FLOOR))
        else:
            s += int(div.quantize(Decimal('0.0'), rounding=ROUND_FLOOR)) // 2
    return s

N = int(input())


if N % 2 == 1:
    print(0)
else:
    print(min(cnt_prime(2, N), cnt_prime(5, N)))
# Judge status: Accepted
X = int(input())

count = 0
temp = 100
ans = 0
while True:
    temp+=temp//100
    count += 1
    ans  = temp
    if ans>=X:
        break
print(count)
# Judge status: Accepted
n,m = map(int,input().split())
ans = n*m
if n ==1 or m==1:
    print(1)
else:
    if ans%2==0:
        print(ans//2)
    else:
        print((ans+1)//2)
# Judge status: Accepted
import fractions
N = int(input())
G = 1
for i in range(N):
    D = int(input())
    G = G * D // fractions.gcd(G, D)
print(G)
# Judge status: Wrong Answer
s = list(input())
k = 0
for i in range(0,len(s),2):
    if s[i] == ('R' or 'U' or 'D'):
        k = 1
    else:
        k = 0
for j in range(1,len(s),2):
    if s[j] == ('L' or 'U' or 'D'):
        k = 1
    else:
        k = 0
        
if k==1:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n,a,b=map(int, input().split())
pot = b-a+1
if(b<a):
    print(0)
    exit()
if n==0:
    print(0)
elif n==1:
    if a==b:
        print(1)
    else:print(0)
elif n==2:
    if a==b:print(1)
    print(1)
else:
    k = n-1
    m = k*b
    high = m+a
    low = a*k + b
    print(high-low+1)
# Judge status: Accepted
a =input()

if a.isupper() == True:
    print("A")
else:
    print("a")
# Judge status: Accepted
a, b = list(map(int, input().split()))

if b != 100:
  ans = 100 ** a * b
else:
  ans = 100 ** a * (b+1)

print(ans)
# Judge status: Accepted
x = input()
x = int(x)
answer = ''

for i in range(9):
    i = i + 1
    if x % i == 0:
        shou = x // i
        if (1 <= i and i <= 9) and (1 <= shou and shou <= 9):
            answer = 'Yes'
            break
        else:
            answer = 'No'
    else:
        answer = 'No'
print(answer)
# Judge status: Wrong Answer
N = int(input())

# 1 <= N <= 10**5 = 100,000

if N <= 9:
  print(N)
elif N <= 999:
  ans = 9 + (N - 99)
  print(ans)
elif N <= 99999:
  ans = 9 + 900 + (N - 9999)
  print(ans)
else:
  print(90909)
# Judge status: Accepted
import collections
n = int(input())
a_lst = list(map(int, input().split()))

c = collections.Counter(a_lst)
cand = [k for k, v in c.items() if v >= 2]
cand = sorted(cand)

if len(cand) >= 2:
  if c[cand[-1]] >= 4:
    print(cand[-1] ** 2)
  else:
    print(cand[-2] * cand[-1])
else:
  print(0)
# Judge status: Accepted
a,b = map(int,input().split())
print(max(a,b) + max(min(a,b),max(a,b)-1))
# Judge status: Wrong Answer
from collections import deque
 
k = int(input())
q = deque([1, 2, 3, 4, 5, 6, 7, 8, 9])
 
for i in range(k):
  a = q.popleft()
  if a % 10 == 0:
    q.append(10*a)
    q.append(10*a + 1)
  elif a % 10 == 9:
    q.append(10*a + 8)
    q.append(10*a + 9)
  else:
    q.append(10*a + a - 1)
    q.append(10*a + a)
    q.append(10*a + a + 1)
else:
  print(a)
# Judge status: Accepted
S = input()
one = S.count('1')
zero = len(S) - one
print(min(one, zero) * 2)
# Judge status: Accepted
N = int(input())
S = input()

ldp = [0] * (N+1)
rdp = [0] * (N+1)

for i in range(N):
    if S[i] == "#":
        ldp[i+1] = ldp[i] + 1
    else:
        ldp[i+1] = ldp[i]

for i in range(N-1, -1, -1):
    if S[i] == ".":
        rdp[i] = rdp[i+1] + 1
    else:
        rdp[i] = rdp[i+1]

#print(ldp)
#print(rdp)
ans = 10 ** 9
for i in range(N+1):
    ans = min(ans, rdp[i]+ldp[i])

print(ans)
# Judge status: Accepted
import math
a, b, x = map(int, input().split())
if 2 * x >= a * a * b: print(math.degrees(math.atan(2/a*(b-x/a** 2))))
else: print(math.degrees(math.atan(a*b*b/(2*x))))
# Judge status: Accepted
from bisect import bisect_left
from collections import deque

N=int(input())
minList=deque([])
minmax=-1
for i in range(N):
  if i==0:
    a=int(input())
    minList.append(a)
    minmax=a
  else:
    a=int(input())
    if a<=minmax:
      minmax=a
      minList.appendleft(a)
    else:
      idx=bisect_left(minList,a)
      if idx==1:minmax=a
      minList[idx-1]=a
print(len(minList))
# Judge status: Wrong Answer
n=int(input())
l=list(map(int,input().split()))
print(n//2)
l.sort()
print(l[n//2]-l[n//2-1])
# Judge status: Wrong Answer
n,m=map(int,input().split())
c=n*m
if n==1 or m==1:
    print(max(0,c-2))
else:
    print(c-n*2-(m-2)*2)
# Judge status: Wrong Answer
S = input()
A = input()

INF = 10**18
idx = INF
word = ''
for i in range(len(A)):
    key = A[:len(A)-i] + '?'*i
    tmp_idx = S.rfind(key)
    if tmp_idx != -1:
        if tmp_idx < idx:
            idx = tmp_idx
            word = key

if idx == INF:
    print('UNRESTORABLE')
    exit(0)

ans = S[:idx] + A + S[idx+len(A):]
ans = ans.replace('?', 'a')
print(ans)
# Judge status: Accepted
n = int(input())
a = [int(input()) for i in range(n)]
b = a.copy()
b.sort()
a_max = b[-1]
a_second = b[-2]
for i in range(n):
    if a[i] == a_max:
        print(a_second)
    else:
        print(a_max)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
mod = 10**9 + 7

b = [0] * 65

for i in range(N):
    bb = format(A[i], "060b")
    for j in range(60):
        if bb[j] == "1":
            b[j] += 1

ans = 0

for j in range(60):
    ans = (ans + b[j] * (N - b[j]) * pow(2, 59 - j, mod)) % mod

print(ans)
# Judge status: Accepted
S = list(map(str, input()))

if S[-1] == "s":
  S.append("e")
  S.append("s")
else:
  S.append("s")

print("".join(S))
# Judge status: Wrong Answer
N=int(input())
print(round(N/2))
# Judge status: Accepted
import sys
import bisect
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
s = readline().rstrip().decode('utf-8')
n = len(s)
for i in range(n):
    if s[i] == "A":
        start = i
        break

for i in range(n-1,-1,-1):
    if s[i] == "Z":
        end = i
        break

print(end-start+1)
# Judge status: Accepted
def judge_status_summary():
    N = int(input())
    res = {"AC":0,"WA":0,"TLE":0,"RE":0}
    for i in range(N):
        res[input()] += 1
    
    for k in res:
        print("{} x {}".format(k,res[k]))
        
judge_status_summary()
# Judge status: Accepted
X, Y = map(int, input().split())
if X <= 8 and Y<=8:
    print("Yay!")

else:
    print(":(")
# Judge status: Wrong Answer
S = input()
if len(S) == 0:
  print('NO')
else:
  if len(S.replace('dreamer', '').replace('dream', '').replace('eraser', '').replace('erase', '')) == 0:
    print('YES')
  else:
    print('NO')
# Judge status: Accepted
n = int(input())
x =list(map(int, input().split()))
xl = min(x)
xr = max(x)
ans = (xr-xl)**2*n
for i in range(xl,xr+1):
        ttl = 0
        for j in x:
            ttl+=(j-i)**2
        ans = min(ans, ttl)
print(ans)
# Judge status: Accepted
import bisect

N = int(input())
L_i = list(map(int, input().split()))

count = 0

L_i.sort()
for i in range(0, N - 2):
    for j in range(i + 1, N - 1):
        count += bisect.bisect_left(L_i,L_i[i] + L_i[j]) - j - 1
        
print(count)
# Judge status: Accepted
from collections import defaultdict
d1 = defaultdict(list)
d2 = defaultdict(list)
S = input()
T = input()
N = len(S)
for i in range(N):
    d1[S[i]].append(i)
for i in range(N):
    d2[T[i]].append(i)
val1 = d1.values()
val2 = d2.values()
val1 = list(val1)
val2 = list(val2)
val1.sort()
val2.sort()
if val1 == val2:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a = input().split()
kumiawase = int(a[0] + a[1])
result = 'No'
for i in range(kumiawase):
  if i**2 == kumiawase:
    result = 'Yes'
    break
print(result)
# Judge status: Wrong Answer
n, k = map(int, input().split())
h = sorted(list(map(int, input().split())), reverse=True)
if n > k:
  print(sum(h[k:]))
else:
  print(sum(h))
# Judge status: Wrong Answer
N, K = map(int, input().split())
A = list(map(int, input().split()))

if K == 1:
    print(N - 1)
elif N == K:
    print(1)
else:
    print((N-1)//(K-1)+1)
# Judge status: Wrong Answer
s = input()
print(*[s[q] if s[q] != "B" else chr(0x08) for q in range(len(s))], sep="")
# Judge status: Accepted
# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
A = np.array(lr(), dtype=np.int32)
counter = np.bincount(A)
case = (counter * (counter-1) // 2).sum()
answer = case - (counter[A] - 1)
print('\n'.join(answer.astype(str)))
# Judge status: Wrong Answer
N, M= (int(x) for x in input().split())
height=[int(x) for x in input().split()]
nlist=[1]*N
print(nlist)

for _ in range(M):
    a, b =(int(x) for x in input().split())
    a-=1
    b-=1
    if height[a]<height[b]:
        nlist[a]=0

    if height[b]<height[a]:
        nlist[b]=0
    print(nlist)

print(sum(nlist))
# Judge status: Accepted
N = int(input())

dic = {}

for _ in range(N):
    a = input()
    if a in dic:
        dic[a] += 1
    else:
        dic[a] = 1

m = max(dic.values())

for s in sorted(k for k in dic if dic[k] == m):
    print(s)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))

syozi = 1000
kabu = 0

for i in range(N-1):
  if A[i] < A[i+1]:
    kabu = syozi // A[i] 
    syozi -= (syozi // A[i]) * A[i]
  elif A[i] > A[i+1]:
    syozi += A[i] * kabu
    kabu = 0
  else:
    pass

syozi += A[-1] * kabu

print(syozi)
# Judge status: Accepted
s = input()
mod = 2019

temp = [1]
for i in range(len(s) - 1):
    temp.append(temp[-1] * 10 % mod)
temp.reverse()
temp2 = []
for i in range(len(s)):
    temp2.append(int(s[i]) * temp[i])
temp3 = [0]
for i in range(len(s)):
    temp3.append((temp3[-1] + temp2[i]) % mod)
temp4 = {}
for i in temp3:
    temp4.setdefault(i, 0)
    temp4[i] += 1
ans = 0
for i in temp4.values():
    ans += (i * (i - 1) // 2)
print(ans)
# Judge status: Wrong Answer
A = int(input())
B = int(input())
if (A or B == 1) and (A or B == 2):
  print(3)
elif (A or B == 1) and (A or B == 3):
  print(2)
elif (A or B == 2) and (A or B == 3):
  print(1)
# Judge status: Accepted
n = int(input())
l = []
ans = "Yes"
for i in range(n):
    a, b = map(int, input().split())
    l.append([b, a])
l.sort(reverse=True)
tmp = l[0][0]
for i in range(n):
    if tmp > l[i][0]:
        tmp = l[i][0]
    tmp -= l[i][1]
    if tmp < 0:
        ans = "No"
        break
print(ans)
# Judge status: Accepted
# https://atcoder.jp/contests/arc080/tasks/arc080_a

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

fours = 0
twos = 0
odd = 0
for num in nums:
    if num % 4 == 0:
        fours += 1
    elif num % 2 == 0:
        twos += 1
    else:
        odd += 1

if twos == 0 and fours + 1 >= odd:
    print('Yes')
elif fours >= odd:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
s=input()
 
for i in range(len(s)):
  if s[i-1]=="h":
    if s[i]=="i":
      print("Yes")
print("No")
# Judge status: Wrong Answer
A,B,C = map(int,input().split())
if A == B and B == C:
  print("No")
else:
  print("Yes")
# Judge status: Accepted
n=int(input())
l=[0]*10**7
s=int(n**0.65)+1
for x in range(1,s):
    for y in range(1,s-x):
        for z in range(1,s-x-y):
            l[x*x+y*y+z*z+x*y+y*z+z*x-1]+=1
for i in range(n):
    print(l[i])