Harryxun/stf_run huggingface dataset:
(N,M) = (int(i) for i in input().split(" "))
A = [int(i) for i in input().split()]
for i in range(N):
	A[i+1] += A[i]
	if A[i+1] > M:
		print(i+2)
		break




### FIXED CODE ###

(N,M) = (int(i) for i in input().split(" "))
A = [int(i) for i in input().split()]
A.append(100000)
for i in range(N):
	A[i+1] += A[i]
	if A[i+1] > M:
		print(i+2)
		break
import heapq

K = input()
a = LI()

a = list(map(lambda x: x*(-1), a))  # 各要素を-1倍

heapq.heapify(a)

for i in range(
print(heapq.heappop(a)*(-1))  # 最大値の取り出し
print(a)

### FIXED CODE ###

import heapq
import math
 
def LI():
  return [int(s) for s in input().split()]
 
N,M = LI()
a = LI()
a = list(map(lambda x: x*(-1), a))  # 各要素を-1倍
 
heapq.heapify(a)
 
for i in range(M):
    x = (-1)*(abs(heapq.heappop(a))//2)
    heapq.heappush(a,x)

cost = 0
for i in range(N):
  x = heapq.heappop(a)
  cost+=abs(x)
  
print(cost)
j=list(map(int,input().split())) 
n=j[0]
m=j[1]
a=list(map(int,input().split()))
s=int(0)
for i in range[0,m]:
  s+=a[i]
if n-s<0:
  print(-1)
else:
  print(n-s)

### FIXED CODE ###

j=list(map(int,input().split())) 
n=j[0]
a=list(map(int,input().split()))
s=sum(a)
if n-s<0:
  print(-1)
else:
  print(n-s)
N,C = map(int,input().split())
D = [list(map(int,input().split())) for _ in range(C)]

G = [list(map(int,input().split())) for _ in range(N)]
g1 = []
g2 = []
g3 = []
for i in range(N):
    for j in range(N):
        G[i][j] -= 1
        if (i+j)%3 == 0:
            g1.append(G[i][j])
        if (i+j)%3 == 1:
            g2.append(G[i][j])
        if (i+j)%3 == 2:
            g3.append(G[i][j])
# print(g1) # グループ1の色リスト
# print(g2)
# print(g3)
# for k in range(C):
#     for i in range(C):
#         for j in range(C):
#             D[i][j] = min(D[i][j], D[i][k] + D[k][j])


cost = [[0]*C for _ in range(3)]
for c in range(C):
    for g in range(3):
        if g == 0:
            cost[c][0] = sum(D[clr_g1][c] for clr_g1 in g1)
        if g == 1:
            cost[c][1] = sum(D[clr_g2][c] for clr_g2 in g2)
        if g == 2:
            cost[c][2] = sum(D[clr_g3][c] for clr_g3 in g3)



ans = float('inf')
for c1 in range(C):
    for c2 in range(C):
        for c3 in range(C):
            temp = 0
            if c1 == c2 or c2 == c3 or c3 == c1:
                continue
            # temp += sum(D[clr_g1][c1] for clr_g1 in g1)
            # temp += sum(D[clr_g2][c2] for clr_g2 in g2)
            # temp += sum(D[clr_g3][c3] for clr_g3 in g3)
            temp = cost[c1][0] + cost[c2][1] + cost[c3][2]
            ans = min(ans,temp)
print(ans)

### FIXED CODE ###

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

G = [list(map(int,input().split())) for _ in range(N)]
g1 = []
g2 = []
g3 = []
for i in range(N):
    for j in range(N):
        G[i][j] -= 1
        if (i+j)%3 == 0:
            g1.append(G[i][j])
        if (i+j)%3 == 1:
            g2.append(G[i][j])
        if (i+j)%3 == 2:
            g3.append(G[i][j])



cost = [[0]*3 for _ in range(C)]
for c in range(C):
    for g in range(3):
        if g == 0:
            cost[c][0] = sum(D[clr_g1][c] for clr_g1 in g1)
        if g == 1:
            cost[c][1] = sum(D[clr_g2][c] for clr_g2 in g2)
        if g == 2:
            cost[c][2] = sum(D[clr_g3][c] for clr_g3 in g3)



ans = float('inf')
for c1 in range(C):
    for c2 in range(C):
        for c3 in range(C):
            temp = 0
            if c1 == c2 or c2 == c3 or c3 == c1:
                continue
            # temp += sum(D[clr_g1][c1] for clr_g1 in g1)
            # temp += sum(D[clr_g2][c2] for clr_g2 in g2)
            # temp += sum(D[clr_g3][c3] for clr_g3 in g3)
            temp = cost[c1][0] + cost[c2][1] + cost[c3][2]
            ans = min(ans,temp)
print(ans)
def get_ends():
  ends = []
  for key, value in graph.items():
    if len(value) == 0: ends.append(key)
  return ends

def get_acm_graph():
  acm_graph =  {i:[i] for i in range(1,N+1)}
  for end in ends:
    tmp_node = end
    while tmp_node != 1:
      for node in acm_graph[tmp_node]:
        if node not in acm_graph[rev_graph[tmp_node]]:
          acm_graph[rev_graph[tmp_node]].append(node)
      tmp_node = rev_graph[tmp_node]
  return acm_graph
  
N,Q = map(int,input().split())
graph = {i:[] for i in range(1,N+1)}
rev_graph = {i:-1 for i in range(1,N+1)}
counter = {i:0 for i in range(1,N+1)}
for _ in range(N-1):
  a,b = map(int,input().split())
  graph[a].append(b)
  rev_graph[b] = a

ends = get_ends()
acm_graph = get_acm_graph()

prc = {}
for _ in range(Q):
  p, x = map(int,input().split())
  if p not in prc: prc[p] = x
  else: prc[p] += x

for p, x in prc.items():
  for node in acm_graph[p]:
    counter[node] += x

print(' '.join([str(counter[i]) for i in range(1,N+1)]))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)
input=lambda :sys.stdin.readline()

def sol():

  N,Q = map(int,input().split())
  graph = [[] for i in range(N)]
  ans = [0 for i in range(N)]
  for _ in range(N-1):
    a,b = map(int,input().split())
    graph[a-1].append(b-1)
    graph[b-1].append(a-1)

  for _ in range(Q):
    p, x = map(int,input().split())
    ans[p-1] += x 
 
  def dfs(v,p=-1):
    for u in graph[v]:
      if u == p: continue
      ans[u] += ans[v]
      dfs(u,v)
  dfs(0)
  print(*ans)

sol()
import numpy as np

n = int(input())
a = input().split()

c1 = a.count('1')
c2 = a.count('2')
c3 = a.count('3')

# dp =[ [[-1] * (n+1) for _ in range(n+1)] for __ in range(c3+1)]
dp = np.full((c3+1, c2+c3+1, n+1), -1.0)
dp[0][0][0] = 0

from functools import lru_cache
@lru_cache(maxsize=None)
def calc_dp(t3,t2,t1):
    # global dp
    if(dp[t3][t2][t1] > -1):
        return dp[t3][t2][t1]

    temp = 0
    if(t3 > 0):
        temp += calc_dp(t3-1,t2+1,t1) * t3/(t1+t2+t3)
    if(t2 > 0):
        temp += calc_dp(t3,t2-1,t1+1) * t2/(t1+t2+t3)
    if(t1 > 0):
        temp += calc_dp(t3,t2,t1-1) * t1/(t1+t2+t3)
    temp = temp + n/(t1+t2+t3)

    # dp[t3][t2][t1] = temp
    return temp

print(calc_dp(c3,c2,c1))

### FIXED CODE ###

n = int(input())
a = input().split()

c1 = a.count('1')
c2 = a.count('2')
c3 = a.count('3')

dp =[ [[0] * (n+1) for _ in range(c3+c2+1)] for __ in range(c3+1)]
# dp[0][0][0] = 0

for i in range(c3+1):
    for j in range(c3+c2+1-i):
        for k in range(n+1-i-j):
            if(i+j+k == 0):
                dp[i][j][k]=0
            else:
                temp = 0
                if(i > 0):
                    temp += dp[i-1][j+1][k] * i/(k+j+i)
                if(j > 0):
                    temp += dp[i][j-1][k+1] * j/(k+j+i)
                if(k > 0):
                    temp += dp[i][j][k-1] * k/(k+j+i)
                dp[i][j][k] = temp + n/(k+j+i)

print(dp[c3][c2][c1])
import numpy as np

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

dp = [np.array([[0]*(N*A+1) for _ in range(N+1)])]
#dp[0]: [0, 0]～[N, N*A]

for x in X:
  new_dp = dp[-1]
  new_dp[1:, x:] += dp[-1][0:N, 0:N*A+1-x]
  new_dp[1, x] += 1
  
  dp.append(new_dp)
#print(dp[-1])
  
print(sum([dp[-1][i, i*A] for i in range(1, N+1)]))



### FIXED CODE ###

import numpy as np

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

dp = [np.array([[0]*(N*A+1) for _ in range(N+1)])]
#dp[0]: [0, 0]～[N, N*A]

for x in X:
  new_dp = dp[-1].copy()
  new_dp[1:, x:] += dp[-1][0:N, 0:N*A+1-x]
  if x<=N*A:
    new_dp[1, x] += 1
  
  dp.append(new_dp)
#print(dp[-1])
  
print(sum([dp[-1][i, i*A] for i in range(1, N+1)]))
n=int(input())
h=list(map(int,input().split()))
c=[]
l=0
for i in range(n-1):
  if h[i]>=h[i+1]:
    c.append(0)
    c[l]+=1
  else:
    c.append(0)
    l+=1
print(max(c))



### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
c=[0]
l=0
for i in range(n-1):
  if h[i]>=h[i+1]:
    
    c[l]+=1
  else:
    c.append(0)
    l+=1
print(max(c))
N, K = map(int, input().split())
r = N - K
mod = 10 ** 9 + 7
dp1 = [[0] * (K) for _ in range(K)]
dp2 = [[0] * (r + 2) for _ in range(r + 2)]

for i in range(K):
	for j in range(K):
		if i == 0:
			dp1[i][j] = 1
		elif j == 0:
			dp1[i][j] = 0
		else:
			dp1[i][j] = (dp1[i - 1][j - 1] + dp1[i][j - 1]) % mod

for i in range(r + 2):
	for j in range(r + 2):
		if i == 0:
			dp2[i][j] = 1
		elif j == 0:
			dp2[i][j] = 0
		else:
			dp2[i][j] = (dp2[i - 1][j - 1] + dp2[i][j - 1]) % mod
			
for i in range(K):
	print(dp1[i][-1] * dp2[i + 1][-1])


### FIXED CODE ###

N, K = map(int, input().split())
r = N - K
mod = 10 ** 9 + 7
dp1 = [[0] * (K) for _ in range(K)]
dp2 = [[0] * (r + 2) for _ in range(K + 1)]

for i in range(K):
	for j in range(K):
		if i == 0:
			dp1[i][j] = 1
		elif j == 0:
			dp1[i][j] = 0
		else:
			dp1[i][j] = (dp1[i - 1][j - 1] + dp1[i][j - 1]) % mod

for i in range(K + 1):
	for j in range(r + 2):
		if i == 0:
			dp2[i][j] = 1
		elif j == 0:
			dp2[i][j] = 0
		else:
			dp2[i][j] = (dp2[i - 1][j - 1] + dp2[i][j - 1]) % mod
			
for i in range(K):
	print((dp1[i][-1] * dp2[i + 1][-1]) % mod)
n, x, y = input().split()
n, x, y = int(n), int(x)-1, int(y)-1
d = [[abs(i-j) for i in range(n)] for j in range(n)]
for i in range(x+1):
    for j in range(y, n):
        d[i][j] -= y-x-1
    for j in range(y-1, x+(y-x)//2, -1):
        d[i][j] = d[i][j+1]+1
for i in range(x+1, x+(y-x)//2):
    for j in range(y, n):
        d[i][j] -= i-x
    for j in range(y-1, y-(y-x)//4+1, -1):
        d[i][j] = d[i][j+1]+1
apar = [0 for i in range(n)]
for i in range(n-1):
    for j in range(i+1, n):
        apar[d[i][j]] += 1
for i in range(1, n):
    print(apar[i])


### FIXED CODE ###

n, x, y = input().split()
n, x, y = int(n), int(x)-1, int(y)-1
d = [[abs(i-j) for i in range(n)] for j in range(n)]
for i in range(x+1):
    for j in range(y, n):
        d[i][j] -= y-x-1
    for j in range(y-1, x+(y-x)//2, -1):
        d[i][j] = d[i][j+1]+1
for i in range(x+1, x+(y-x)//2):
    d[i][y] = d[i][x] + 1
    for j in range(y+1, n):
        d[i][j] = d[i][j-1]+1
    for j in range(y-1, x+(y-x)//2+(i-x), -1):
        d[i][j] = d[i][j+1]+1
apar = [0 for i in range(n)]
for i in range(n-1):
    for j in range(i+1, n):
        apar[d[i][j]] += 1
for i in range(1, n):
    print(apar[i])
x,y = map(int,input().split())
k = abs(abs(x)-abs(y))
if x < 0 and y <= 0 or x >= 0 and y > 0:
  if x > y:
    ans += 2
else:
  ans += 1
print(ans)

### FIXED CODE ###

x,y = map(int,input().split())
k = abs(abs(x)-abs(y))
if x < 0 and y <= 0 or x >= 0 and y > 0:
  if x > y:
    k += 2
else:
  k += 1
print(k)
N=int(input())
p=list(map(int,input().split()))
half=max(p)
sum=0
i=0
for i in range(N):
  sum+=p[i]
  i+=1
all=sum-half
print(half//2+all)


### FIXED CODE ###

n=int(input())
p=[int(input()) for _ in range(n)]
p.sort()
s=0
for i in range(n-1):
  s+=p[i]
ans=s+(p[n-1]//2)
print(ans)
def main():
    N=int(input())
    a=list(map(int,input().split()))
    cal=1

    if a.index(0):
        print(0)
        return
        
    for i in range(N):
        cal*=a[i]
        if cal>=10**18:
            print("-1")
            return

    print(cal)
    return


main()


### FIXED CODE ###

def main():
    N=int(input())
    a=list(map(int,input().split()))
    cal=1

    if a.count(0)>=1:
        print(0)
        return

    for i in range(N):
        cal*=a[i]
        if cal>10**18:
            print("-1")
            return

    print(cal)
    return


main()
import sys
input = sys.stdin.readline


def main():
    N, A = map(int, input().split())
    X = list(map(int, input().split()))

    M = max(X)*N
    dp = [[[0 for k in range(M+1)] for j in range(N+1)] for i in range(N+1)]
    dp[0][0][0] = 1
    for i in range(N):
        for j in range(N):
            for k in range(M):
                if dp[i][j][k]:
                    dp[i+1][j][k] += dp[i][j][k]
                    dp[i+1][j+1][k+X[i]] += dp[i][j][k]
    ans = 0
    for j in range(1, N+1):
        ans += dp[N][j][A*j]
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline


def main():
    N, A = map(int, input().split())
    X = list(map(int, input().split()))

    M = max(max(X), A)*N
    dp = [[[0 for k in range(M+1)] for j in range(N+1)] for i in range(N+1)]
    dp[0][0][0] = 1
    for i in range(N):
        for j in range(N):
            for k in range(M):
                if dp[i][j][k]:
                    dp[i+1][j][k] += dp[i][j][k]
                    dp[i+1][j+1][k+X[i]] += dp[i][j][k]
    ans = 0
    for j in range(1, N+1):
        ans += dp[N][j][A*j]
    print(ans)


if __name__ == '__main__':
    main()
Sum = int(input())

r = 0
for i in range(26):
    for k in range(15):
        if 4*i+7*k == Sum:
            r = r +1
        else:
            r = r
if r > 0:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

N, K = map(int, input().split(" "))

q = N//K
mod = N % K
if mod > 0:
    print(1)
else:
    print(0)
import math
X,Y = map(int,input().split())
def comb(n,r):
    return math.factorial(n) // (math.factorial(n-r) * math.factorial(r))
if (X+Y)%3 != 0:
    print(0)
else:
    n = int((2*Y-X)/3)
    m = int((2*X-Y)/3)
    if n < 0 or m < 0:
        print(0)
    else:
        print((comb(n+m,min([n,m])))%(10**9+7))

### FIXED CODE ###

r = int(input())
print(int(r**2))
from collections import Counter
n = int(input())
s = input()
d = Counter(s)
f = [d[i] for i in d]
c = f[0] * f[1] * f[2]

for j in range(n):
	for i in range(n):
		if(j-i < 0 or j+i >= n):
			break
		elif(s[j-i] != s[j] and s[j+i] != s[j] and s[j+i] != s[j-i]):	c -= 1
 
print(c)

### FIXED CODE ###

import sys

n = int(sys.stdin.readline().rstrip())
s = sys.stdin.readline().rstrip()
r = []
b = []
g = []
for i, si in enumerate(s):
    if si == 'R':
        r.append(i + 1)
    elif si == 'G':
        g.append(i + 1)
    elif si == 'B':
        b.append(i + 1)
count = 0
for i in range(n):
    for j in range(i + 1, n):
        k = j + j - i
        if k < n and s[i] != s[j] and s[j] != s[k] and s[k] != s[i]:
            count += 1
print(len(r) * len(g) * len(b) - count)
A, B, C = map(int, input().split())

print(max(C - (A - B)), 0)

### FIXED CODE ###

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

print(max(C - (A - B), 0))
import math
print(int(math.sqrt(int(input()))) ** 2

### FIXED CODE ###

import math
print(int(math.sqrt(int(input()))) ** 2)
def toStr(n,base):
    convertString = "0123456789ABCDEF"
    if n < base:
        return convertString[n]
    else:
        return toStr(n//base,base) + convertString[n%base]

a,b = map(int,input().split())
print(len(toStr(a,b)))

### FIXED CODE ###

N, R = map(int, input().split())
if N < 10:
    print((100*(10-N))+R)
else:
    print(R)
a, b, c, d = list(input())
for q in range(1, 3):
    ao = ("+" if q % 2 else "-")
    for w in range(1, 3):
        bo = ("+" if w % 2 else "-")
        for e in range(1, 3):
            if eval(a + ao + b + bo + c + ("+" if e % 2 else "-") + d) == 7:
                print(f'{a}{ao}{b}{bo}{c}{("+" if e%2else"-")}{d}=7')
                exit(0)

### FIXED CODE ###

a, b, c, d = list(input())
for q in range(1, 3):
    ao = ("+" if q % 2 else "-")
    for w in range(1, 3):
        bo = ("+" if w % 2 else "-")
        for e in range(1, 3):
            if eval(a + ao + b + bo + c + ("+" if e % 2 else "-") + d) == 7:
                print(a + ao + b + bo + c + ("+" if e%2else"-") + d + "=7")
                exit(0)
n, m = map(int, input().split())
if n == m:
  print('Yes')
else:
  print('No")

### FIXED CODE ###

n, m = map(int, input().split())
if n == m:
  print('Yes')
else:
  print('No')
rint(15 - sum(list(map(int, input().split()))))

### FIXED CODE ###

x = list(map(int, input().split()))
if x[0] == 0: print(1)
if x[1] == 0: print(2)
if x[2] == 0: print(3)
if x[3] == 0: print(4)
if x[4] == 0: print(5)
# import numpy as np
class UnionFind:
    def __init__(self, n):
        # self.parent = np.array([-1] * n)
        # self.size = np.array([1] * n)
        self.parent = [-1] * n
        self.size = [1] * n
    def find(self, x):
        if self.parent[x] == -1:
            return x
        else:
            a = self.find(self.parent[x])
            self.parent[x] = a
            return a
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            self.parent[x] = y
            self.size[y] += self.size[x]
    def get_size(self, x):
        return self.size[self.find(x)]
    def printout(self):
        print(self.parent)
        print(self.size)

N, M, K = map(int, input().split())
uf = UnionFind(N)

ab = [[int(i)-1 for i in input().split()] for j in range(M)]
cd = [[int(i)-1 for i in input().split()] for j in range(K)]

for a, b in ab:
    uf.union(a, b)

ans =[uf.get_size(i)-1 for i in range(N)]

# for a, b in ab:
#     ans[a] -= 1
#     ans[b] -= 1

# for c, d in cd:
#     if uf.find(c) == uf.find(d):
#         ans[c] -= 1
#         ans[d] -= 1

# print(*ans)

### FIXED CODE ###

import sys #追加
sys.setrecursionlimit(500*500) #追加

class UnionFind:
    def __init__(self, n):
        self.parent = [-1] * n
        self.size = [1] * n
    def find(self, x):
        if self.parent[x] == -1:
            return x
        else:
            a = self.find(self.parent[x])
            self.parent[x] = a
            return a
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            self.parent[x] = y
            self.size[y] += self.size[x]
    def get_size(self, x):
        return self.size[self.find(x)]
    def printout(self):
        print(self.parent)
        print(self.size)

N, M, K = map(int, input().split())
uf = UnionFind(N)

ab = [[int(i)-1 for i in input().split()] for j in range(M)]
cd = [[int(i)-1 for i in input().split()] for j in range(K)]

for a, b in ab:
    uf.union(a, b) #RE

ans =[uf.get_size(i)-1 for i in range(N)]

for a, b in ab:
    ans[a] -= 1
    ans[b] -= 1

for c, d in cd:
    if uf.find(c) == uf.find(d):
        ans[c] -= 1
        ans[d] -= 1

print(*ans)
a = int(input())
b = int(input())
menseki = a*b
nagasa = (a+b)*2
print mensaki,nagasa.split()

### FIXED CODE ###

a,b=[int(i) for i in input().split()]
print(a*b,(a+b)*2)
A, B, C, D = input().split()

if math.ceil(int(C)*1.0/(int(B)*1.0)) >= math.ceil(int(A)*1.0/(int(D)*1.0))
  print("Yes")
else:
  print("No")

### FIXED CODE ###

import math
A, B, C, D = input().split()
 
if math.ceil(int(C)*1.0/(int(B)*1.0)) <= math.ceil(int(A)*1.0/(int(D)*1.0)):
  print("Yes")
else:
  print("No")
'''
red blue
3 4
red
'''
a, b = [x for x in input().split()]
an, bn = [int(x) for x in input().split()]
threw = input()
if threw == a:an -= 1
  else:
    bn -= 1
print(an, bn)    
  

### FIXED CODE ###

'''
red blue
3 4
red
'''
a, b = [x for x in input().split()]
an, bn = [int(x) for x in input().split()]
threw = input()
if threw == a:an -= 1
else:
    bn -= 1
print(an, bn)
from sys import stdin
data = []
for _ in range(N):
    data.append([int(x) for x in stdin.readline().rstrip().split()])
ans = str(data[0][0]) + str(data[1][1]) + str(data[2][2])
print(ans)

### FIXED CODE ###

from sys import stdin
data = []
for _ in range(3):
    data.append(input())
ans = data[0][0] + data[1][1] + data[2][2]
print(ans)
import itertools
N,M,Q=map(int,input().split())
L=[]
for q in range(Q):
    L.append(list(map(int,input().split())))

A = list(itertools.combinations([q for q in range(1,(M+1))], N))
# print(L)
# print(A)
count=[]
for a in A:
    # tmp=0
    tmp=[]
    for l in L:
        if a[l[1]-1] - a[l[0]-1] == l[2]:
            tmp.append(l[3])
        else:
            pass
    # print(tmp)
    count.append(sum(tmp))

# print(count)

print(max(count))


### FIXED CODE ###

import itertools
N,M,Q=map(int,input().split())
L=[]
for q in range(Q):
    L.append(list(map(int,input().split())))

A = itertools.combinations_with_replacement([q for q in range(1,(M+1))], N)
count=[]
for a in A:
    tmp=0
    for l in L:
        
        if a[l[1]-1] - a[l[0]-1] == l[2]:
            tmp+=l[3]
    count.append(tmp)

print(max(count))
r,g,b=map(str,input().strip())=l
if 0 == (int(l)%4):
  print('YES')
else:
  print('NO')

### FIXED CODE ###

r,g,b=map(int,input().split())
l=(str(r)+str(g)+str(b))
if 0 == (int(l)%4):
  print('YES')
else:
  print('NO')
N = int(input())
S = input()
ans = false
if N % 2 == 0:
  ans = S[:N//2] == S[N//2:]
print(ans)

### FIXED CODE ###

N = int(input())
S = input()
ans = 'No'
if N % 2 == 0 and S[:N//2] == S[N//2:]:
  ans = 'Yes'
print(ans)
#Deven-Eleven:
D = (((-1, -1), (0, -1), (1, 0), (0, 1), (-1, 1), (-1, 0)),
     ((0, -1), (1, -1), (1, 0), (1, 1), (0, 1), (-1, 0)))
def func(y, x):
    q = [(y, x, 0)]
    cover = [[-1] * m for _ in xrange(n)]
    while len(q) != 0:
        y, x, step = q.pop(0)
        if cover[y][x] >= 0:
            continue
        cover[y][x] = step
        for dx, dy in D[y % 2]:           
            ny, nx = y + dy, x + dx
            if 0 <= ny < n and 0 <= nx < m:
                q.append((ny, nx, step + 1))
    return cover
 
def solve():
    scover = [func(pos[1] - 1, pos[0] - 1) for pos in spos]
    min_cover = [[min(sc[y][x] for sc in scover) for x in xrange(m)] for y in xrange(n)]
    def count(cover):
        ret = 0
        for y in xrange(n):
            for x in xrange(m):
                if cover[y][x] < min_cover[y][x]:
                    ret += 1
        return ret
    return max(count(func(pos[1] - 1, pos[0] - 1)) for pos in tpos)

while True:
    data = raw_input().sprit()
    m, n = map(int, data.split())
    if m == 0:
        break
    s = input()
    spos = [map(int, raw_input().split()) for _ in xrange(s)]
    t = input()
    tpos = [map(int, raw_input().split()) for _ in xrange(t)]
    print solve()

### FIXED CODE ###

#Deven-Eleven:
D = (((-1, -1), (0, -1), (1, 0), (0, 1), (-1, 1), (-1, 0)),
     ((0, -1), (1, -1), (1, 0), (1, 1), (0, 1), (-1, 0)))
def func(y, x):
    q = [(y, x, 0)]
    cover = [[-1] * m for _ in xrange(n)]
    while len(q) != 0:
        y, x, step = q.pop(0)
        if cover[y][x] >= 0:
            continue
        cover[y][x] = step
        for dx, dy in D[y % 2]:           
            ny, nx = y + dy, x + dx
            if 0 <= ny < n and 0 <= nx < m:
                q.append((ny, nx, step + 1))
    return cover
 
def solve():
    scover = [func(pos[1] - 1, pos[0] - 1) for pos in spos]
    min_cover = [[min(sc[y][x] for sc in scover) for x in xrange(m)] for y in xrange(n)]
    def count(cover):
        ret = 0
        for y in xrange(n):
            for x in xrange(m):
                if cover[y][x] < min_cover[y][x]:
                    ret += 1
        return ret
    return max(count(func(pos[1] - 1, pos[0] - 1)) for pos in tpos)

while True:
    data = raw_input()
    m, n = map(int, data.split())
    if m == 0:
        break
    s = input()
    spos = [map(int, raw_input().split()) for _ in xrange(s)]
    t = input()
    tpos = [map(int, raw_input().split()) for _ in xrange(t)]
    print solve()
import math

r = int(raw_input())
print " ".join([float(r)**2 * math.pi, float(r) * 2 * math.pi])

### FIXED CODE ###

import math
import sys

r = float(raw_input())
print str('%.5f' % (r**2 * math.pi)) + " " + str('%.5f' % (r * 2 * math.pi))
sys.exit()