Harryxun/stf_run huggingface dataset:
N=int(input())
list = []
flg = True
for A in range(1,int((N+1)**0.5)):
    for B in range(int((N+1)**0.5),N+1):
        if A*B==N:
            list.append(len(str(B)))
list.sort()
print((list[0]))


### FIXED CODE ###

N = int(input())
ans = len(str(N))
for i in range(1,int(N**0.5)+1):
    if N % i == 0:
        #print(i)
        #print("leng",len(str(N/i)))
        #print(ans,len(str(i)),len(str(N//i)),len(str(int(N/i))))
        ans = min(ans,max(len(str(i)),len(str(N//i))))
print(ans)
s = input()
return s[2]==s[3] and s[4] == s[5]

### FIXED CODE ###

s = input()
if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
else:
  print("No")
import math
pi=round(math.pi,7)
length=str(round(r*2*pi,6))
area=str(round(r**2*pi,6))
print("{} {}".format(length,area))


### FIXED CODE ###

import math
pi=math.pi
r=float(input())
print("{:.5f} {:.5f}".format(r*r*pi,2*r*pi))
import math
a,b=map(int,input().split())
c=math.gcd(a,b)
d=[]
for i in range(2,int(c**0.5)+2):
    while c%i==0:
        c//=i
        d.append(i)
if c!=1:
    d.append(c)
print(len(set(d))+1)

### FIXED CODE ###

import math
a,b=map(int,input().split())
while b!=0:
    a,b=b,a%b
c=a
d=[]
for i in range(2,int(c**0.5)+2):
    while c%i==0:
        c//=i
        d.append(i)
if c!=1:
    d.append(c)
print(len(set(d))+1)
#138_D
n, q = map(int, input().split())

edges = [[] for _ in range(n)]
cnt = [0 for _ in range(n)]

for _ in range(n-1):
    a, b = map(int, input().split())
    edges[a-1].append(b-1)
    edges[b-1].append(a-1)
    
for _ in range(q):
    p, x = map(int, input().split())
    cnt[p-1] += x
    
def dfs(frm, cur):
    for to in edges[cur]:
        if to != frm:
            cnt[to] += cnt[cur]
            dfs(cur, to)
dfs(-1, 0)          
print(*cnt)

### FIXED CODE ###

#138_D
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 6)

n, q = map(int, input().split())

edges = [[] for _ in range(n)]
cnt = [0 for _ in range(n)]

for _ in range(n-1):
    a, b = map(int, input().split())
    edges[a-1].append(b-1)
    edges[b-1].append(a-1)
    
for _ in range(q):
    p, x = map(int, input().split())
    cnt[p-1] += x
    
def dfs(frm, cur):
    for to in edges[cur]:
        if to != frm:
            cnt[to] += cnt[cur]
            dfs(cur, to)
dfs(-1, 0)          
print(*cnt)
in_list = input().split(' ')

N = int(in_list[0])
Y = int(in_list[1])

x = int(Y/10000)
y = int(Y/5000)
z = int(Y/1000)

# x + y + z = N

get_answer_flg = 0
for k in range(z+1):
    if get_answer_flg==1:
        break;
    else:
        res_y_i = Y - k*1000
        # print('res_y_first：', res_y_i)
        for j in range(y+1):
            res_y_j = res_y_i - j*5000
            i = res_y_j/10000
            # print('res_y_second：', res_y_j)
            # print('j：', j)
            # print('i：', i)
            if i<0:
                break;
            elif i == 0:
                get_answer_flg = 1
                print(f'{int(i)} {j} {k}')
                break;
            elif i>0 and i.is_integer() and (i+j+k)<=N:
                get_answer_flg = 1
                print(f'{int(i)} {j} {k}')
                break;

if get_answer_flg==0:
    print('-1 -1 -1')

### FIXED CODE ###

S = input().split('/')

S[0] = '2018'

print('/'.join(S))
import sys
ds = int(raw_input())
list =[int(x) for x in sys.stdin]
print list
for i in xrange(ds):
    print str(list[i*2]+list[i*2+1])

### FIXED CODE ###

ds = int(raw_input())
for i in xrange(ds):
    x=int(raw_input())
    y=int(raw_input())
    sum = str(x+y)
    if len(sum) > 80:
        print "overflow"
    else:
        print sum
n,m=map(int,input().split())
r={}
for _ in range(m):
  a,b=map(int,input().split())
  a,b=a-1,b-1
  #print(a,b)
  if a not in r: r[a]=[]
  r[a].append(b)
  if b not in r: r[b]=[]
  r[b].append(a)

ans = {0:0}
steps = [-1]*n
steps[0]=0
def setroot(i,step):
  newroom = [v for v in r[i] if steps[v]<0 or steps[v]>step]
  #print(i,newroom)
  if len(newroom)>0:
    for v in newroom:ans[v]=i;steps[v]=step
    for v in newroom:setroot(v,step+1)
setroot(0,0)

### FIXED CODE ###

f=lambda:map(int,input().split())
n,m=f()
g=[[] for _ in range(n)]
for _ in range(m):
  a,b=f()
  g[a-1]+=[b-1]
  g[b-1]+=[a-1]
p=[0]*n
from collections import*
q=deque([0])
while q:
  v=q.popleft()
  for c in g[v]:
    if p[c]<1: p[c]=v+1; q.append(c)
if 0 in p: print('No')
else: print('Yes',*p[1:],sep='\n')
_in = list(open(0))
h, w = list(map(int, _in[0].split()))

s = []
for i, y in enumerate(_in[1:]):
    a.append([])
    for j, x in enumerate(y):
        if x == '#':
            s.append((i,j,0))

a = [[-1]*w for _ in range(h)]

while s:
    q, s = s[0], s[1:]
    if a[q[0]][q[1]] != -1:
        continue
    
    a[q[0]][q[1]] = q[2]
    ans = q[2]
    
    if q[0]>0:
        s.append((q[0]-1, q[1], q[2]+1))
    if q[0]<h-1:
        s.append((q[0]+1, q[1], q[2]+1))
    if q[1]>0:
        s.append((q[0], q[1]-1, q[2]+1))
    if q[1]<w-1:
        s.append((q[0], q[1]+1, q[2]+1))
        
print(ans)

### FIXED CODE ###

def main():
    H, W = map(int, input().split())
    m = []
    m.append([True] * (W + 2))
    for _ in range(H):
        m.append([True] + [c == '#' for c in input()] + [True])
    m.append([True] * (W + 2))
    queue = []
    for i in range(1, H + 1):
        for j in range(1, W + 1):
            if m[i][j]:
                queue.append((i, j))
    ans = -1
    while queue:
        ans += 1
        tmp = []
        for x, y in queue:
            if not m[x - 1][y]:
                m[x - 1][y] = True
                tmp.append((x - 1, y))
            if not m[x + 1][y]:
                m[x + 1][y] = True
                tmp.append((x + 1, y))
            if not m[x][y - 1]:
                m[x][y - 1] = True
                tmp.append((x, y - 1))
            if not m[x][y + 1]:
                m[x][y + 1] = True
                tmp.append((x, y + 1))
        queue = tmp
    print(ans)

if __name__ == '__main__':
    main()
h,w,m=(int(i) for i in input().split())
l1=[]
l2=[0]*h
l3=[0]*w
for i in range(m):
    x,y=(int(i) for i in input().split())
    l1.append((x,y))
    l2[x-1]+=1
    l3[y-1]+=1
m1=max(l2)
m2=max(l3)
m3=max(m1,m2)
if(m3==m1):
    l4=[0]*w
    k=l2.index(m1)
    for i in range(m):
        if(l1[i][0]!=k+1):
           l4[l1[i][1]-1]+=1
    k1=max(l4)
    print(m1+k1)
else:
    l4=[0]*h
    k=l3.index(m2)
    for i in range(m):
        if(l1[i][0]!=k+1):
           l4[l1[i][1]-1]+=1
    k1=max(l4)
    k2=l4.index(k1)
    print(m2+k1)

### FIXED CODE ###

h,w,m=(int(i) for i in input().split())
l1=[]
l2=[0]*h
l3=[0]*w
for i in range(m):
    x,y=(int(i) for i in input().split())
    l1.append((x,y))
    l2[x-1]+=1
    l3[y-1]+=1
m1=max(l2)
m2=max(l3)
m3=max(m1,m2)
if(m1>m2):
    l4=[0]*w
    k=l2.index(m1)
    for i in range(m):
        if(l1[i][0]!=k+1):
           l4[l1[i][1]-1]+=1
    k1=max(l4)
    print(m3+k1)
else:
    l4=[0]*h
    k=l3.index(m2)
    for i in range(m):
        if(l1[i][1]!=k+1):
           l4[l1[i][0]-1]+=1
    k1=max(l4)
    print(m3+k1)
import math

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

n,k = map(int,input().split())
mod = 10**9 + 7
for i in range(1,k+1):
    if n-k+1 < i:
        print(0)
    elif k-i== 0:
        print(combinations_count(n-k+1,i)% mod)
    else:
        a = int(math.factorial(k-1)/(math.factorial(k-i)*math.factorial(i-1)))
        print((combinations_count(n-k+1,i)*a) % mod)

### FIXED CODE ###

import math

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

n,k = map(int,input().split())
mod = 10**9 + 7
for i in range(1,k+1):
    if n-k+1 < i:
        print(0)
    elif k-i== 0:
        print(combinations_count(n-k+1,i)% mod)
    else:
        a = math.factorial(k-1)//(math.factorial(k-i)*math.factorial(i-1))
        print((combinations_count(n-k+1,i)*a) % mod)
n=int(input())
p=list(map(int,input().split()))
cnt=0
for i in range(n):
  if i+1 == p[i]:
    p[i+1]=p[i]
    cnt+=1
print(cnt)


### FIXED CODE ###

n=int(input())
p=list(map(int,input().split()))
cnt=0
for i in range(n-1):
  if i+1 == p[i]:
    p[i+1]=p[i]
    cnt+=1
if p[n-1] == n:
  cnt+=1
print(cnt)
n, m = map(int, input().split())
if n*500 < m:
  print("No")
else:
  pprint("Yes")

### FIXED CODE ###

n, m = map(int, input().split())
if n*500 < m:
  print("No")
else:
  print("Yes")
N, R = map(int, input().split())
if N >= 10:
  print(R)
else:
  print(R+100(10-N))

### FIXED CODE ###

N, R = map(int, input().split())
if N >= 10:
  print(R)
else:
  print(R+100*(10-N))
N, M = map(int, input().split())
item_vote = list(map(int, input().split()))

total_vote = sum(item_vote)
item_vote = sorted(item_vote, reverse=True)
boder = total_vote/4*M
if item_vote[M-1] >= boder:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

X, Y, Z = map(int, input().split())
X, Y = Y, X
X, Z = Z, X
print(str(X)+' '+str(Y)+' '+str(Z))
N,M = map(int,input().split())
a = 0
w = 0
lis = [[] for _ in range(N)]
for i in range(M):
  p,s = map(int,input().split())
  p = int(p)
  lis[p - 1].append(s)
for j in range(N):
  if lis[j].count("AC") > 0:
    a += 1
    w += lis[j].index("AC")

    
print(a,w)



### FIXED CODE ###

N,M = map(int,input().split())
a = 0
w = 0
lis = [[] for _ in range(N)]
for i in range(M):
  p,s = map(str,input().split())
  p = int(p)
  lis[p - 1].append(s)
for j in range(N):
  if lis[j].count("AC") > 0:
    a += 1
    w += lis[j].index("AC")

    
print(a,w)
S=list(input())
flag=0
Ccount=0
Lcount=0
if S[0]=="A":
  flag+=1
  del S[0]
if flag!=1:
  flag=-100
N=len(S)
for i in range(1,N-1):
  if S[i]=="C":
    Ccount+=1
    del S[i]
if Ccount==1:
  flag+=1
if flag!=2:
  flag=-100
N=len(S)
for i in range(N):
  if S[i].islower():
    Lcount+=1
if Lcount==N:
  flag+=1
if flag==3:
  print("AC")
else:
  print("WA")

### FIXED CODE ###

S=list(input())
flag=0
Ccount=0
Cnumber=0
if S[0]=="A":
  flag+=1
if S[2:-1].count("C")==1:
  flag+=1
  del S[0]
  S.remove("C")
if str(S).islower():
  flag+=1
if flag==3:
  print("AC")
else:
  print("WA")
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 22 16:06:57 2017

@author: 0048005387
"""

h, w = map(int, raw_input().split())
c=[]

for i in range(h):
    c.append(map(str, raw_input().split()))
    
for i in c:
    for j in i:
        print j
22 3    for j in i:
        print j


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Wed Feb 22 16:06:57 2017

@author: 0048005387
"""

h, w = map(int, raw_input().split())
c=[]

for i in range(h):
    c.append(map(str, raw_input().split()))
    
for i in c:
    for j in i:
        print j
    for j in i:
        print j
import math
A, B = map(int, input().split())
print(math.ceil((B-1)/(A-1))

### FIXED CODE ###

import math
A, B = map(int, input().split())
print(math.ceil((B-1)/(A-1)))
import sys
def main():
  for line in sys.stdout:
    print(int(line.strip())**3)

if __name__ == "__main__":
  main()

### FIXED CODE ###

#!/usr/bin/env python

import sys

def main():
    for line in sys.stdin:
        print(int(line)**3)

if __name__ == '__main__':
    main()
n, m = map(int, input().split())
s = [0]*m
c = [0]*m
num = ['']*n
for i in range(m):
    s[i], c[i] = map(int, input().split())
    if s[i]==1 and c[i]==0:
        print(-1)
        exit()
    elif num[s[i]-1] == '':
        num[s[i]-1] = c[i]
    elif num[s[i]-1] != c[i]:
        print(-1)
        exit()
for i in range(m):
    if num[i]=='':
        num[i] = 1
print(''.join(map(str,num)), end="")

### FIXED CODE ###

from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n, m = MAP()
ans = [-1]*n

for i in range(m):
    s, c = MAP()
    s -= 1
    if ans[s] == -1 or ans[s] == c:
        ans[s] = c
    else:
        print(-1)
        exit()

if ans[0] == 0:
    if n == 1:
        print(0)
    else:
        print(-1)
    exit()
else:
    for i in range(n):
        if ans[i] == -1:
            if n != 1 and i == 0:
                ans[i] = 1
            else:
                ans[i] = 0
    print(*ans, sep='')
def solve():
    from sys import stdin
    f_i = stdin
    
    N = int(f_i.readline())
    
    points = []
    for i in range(N):
        x, y = map(int, f_i.readline().split())
        points.append(x + y * 1j)
    
    from itertools import combinations
    radiuses = []
    
    for p1, p2 in combinations(points, 2):
        c = (p1 + p2) / 2
        r = abs(p1 - c)
        for p in points:
            if abs(p - c) > r:
                break
        else:
            radiuses.append(r)
    
    if radiuses:
        return min(radiuses)
    
    def circumcircle(a, b, c):
        n = (a - b) * abs(c) ** 2 + (b - c) * abs(a) ** 2 + (c - a) * abs(b) ** 2
        d = (a - b) * c.conjugate() + (b - c) * a.conjugate() + (c - a) * b.conjugate()
        return n / d # center of circumcircle
    
    for p1, p2, p3 in combinations(points, 3):
        z = (p3 - p1) / (p2 - p1)
        if z.imag == 0:
            continue
        
        c = circumcircle(p1, p2, p3)
        r = abs(p1 - c)
        for p in points:
            if abs(p - c) > r:
                break
        else:
            radiuses.append(r)
    
    return min(radiuses)

print(solve())

### FIXED CODE ###

def solve():
    from sys import stdin
    f_i = stdin
    
    N = int(f_i.readline())
    
    points = []
    for i in range(N):
        x, y = map(int, f_i.readline().split())
        points.append(x + y * 1j)
    
    from itertools import combinations
    radiuses = []
    
    for p1, p2 in combinations(points, 2):
        c = (p1 + p2) / 2
        r = abs(p1 - c)
        for p in points:
            if abs(p - c) > r:
                break
        else:
            radiuses.append(r)
    
    if radiuses:
        return min(radiuses)
    
    def circumcircle(a, b, c):
        n = (a - b) * abs(c) ** 2 + (b - c) * abs(a) ** 2 + (c - a) * abs(b) ** 2
        d = (a - b) * c.conjugate() + (b - c) * a.conjugate() + (c - a) * b.conjugate()
        return n / d # center of circumcircle
    
    err = 10 ** -7
    for p1, p2, p3 in combinations(points, 3):
        z1 = p3 - p1
        z2 = p2 - p1
        if z1.real * z2.imag == z1.imag * z2.real:
            continue
        
        c = circumcircle(p1, p2, p3)
        r = abs(p1 - c)
        for p in points:
            #if abs(p - c) > r:
            if abs(p - c) - r > err:
                break
        else:
            radiuses.append(r)
    
    return min(radiuses)

print(solve())
n = int(input())
n = int(log2(n))+1
print(2**n-1)

### FIXED CODE ###

import math
n = int(input())
n = int(math.log2(n))+1
print(2**n-1)
import numpy as np
def binary(_x):
    x = _x
    l = int(np.log2(x) + 1)
    res = [0] * l
    
    for i in range(l):
        res[i] += x%2
        x = int(x/2)
    return res


def a_xor(lis, i, sub, sub_max):
    return lis[i] * ( ( sub_max - sub + 1 ) % 2 )


def b_xor(lis, i, sub, sub_max):
    return lis[i] * ( ( sub_max - sub ) % 2 )


def main():
    A, B = map(int, input().split())
    bin_a = binary(A)
    bin_b = binary(B)
    odd_even_vec = [0] * len(bin_b)

    #print("a")
    sub = 0
    sub_max = 0
    for i, bit in enumerate(bin_a):
        if i == 0:
            odd_even_vec[i] += bit%2
        else:
            k = i-1
            sub += bit * 2**k
            sub_max += 2**k
            odd_even_vec[i] += a_xor(bin_a, i, sub, sub_max)
        #print(odd_even_vec, sub, sub_max)

    #print("b")
    sub = 0
    sub_max = 0
    for i, bit in enumerate(bin_b):
        if i == 0:
            odd_even_vec[i] += bit%2
        else:
            k = i-1
            sub += bit * 2**k
            sub_max += 2**k
            odd_even_vec[i] += b_xor(bin_b, i, sub, sub_max)
            
        #print(odd_even_vec, sub, sub_max)
        
    res = 0
    for i, bit in enumerate(odd_even_vec):
        res += bit%2 * 2**i

    print (res)

    
main()


### FIXED CODE ###

H, W = map(int, input().split())
h, w = map(int, input().split())

res = (H-h)*(W-w)

print(res)
import numpy as np
from collections import deque
N = input()
A = []
for i in range(N):
	a = input()
	A.append(a)

A = sorted(A)
res = []
begin = 0
end = len(A) - 1
res = deque()
res.append(A[begin])
res.append(A[end])
begin+= 1
end -= 1
for i in range(N - 2):
	cand = np.argmax([abs(res[0] - A[begin]), abs(res[0] - A[end]), abs(res[-1] - A[begin]), abs(res[-1] - A[end])])
	if cand == 0:
		res.appendleft(A[begin])
		begin += 1
	elif cand == 1:
		res.appendleft(A[end])
		end -= 1
	elif cand == 2:
		res.append(A[begin])
		begin += 1
	elif cand == 3:
		res.append(A[end])
		end -= 1
sum_diff = 0
for i in range(N - 1):
	 sum_diff += abs(res[i] - res[i + 1])
print sum_diff


### FIXED CODE ###

from collections import deque
N = input()
A = [int(input()) for i in range(N)]
coef = [2] * N
coef[0] = 1
coef[-1] = 1
coef1 = [coef[i] if i % 2 == 0 else coef[i] * -1 for i in range(N)]
coef2 = [coef[i] if i % 2 != 0 else coef[i] * -1 for i in range(N)]

A = sorted(A)
coef1 = sorted(coef1)
coef2 = sorted(coef2)
res1 = 0
for i in range(N):
	res1 += A[i] * coef1[i]
res2 = 0
for i in range(N):
	res2 += A[i] * coef2[i]
print max(res1, res2)
a,b= map(int,input().split())
for i in range(-a+1,a);
    print(b+a)


### FIXED CODE ###

a,b= map(int,input().split())
for i in range(-a+1,a):
    print(b+i, end=" ")
print()
n, m = map(int, input().split())
a = [-1 for i in range(n)]
possibility = True
for i in range(m):
    s, c = map(int, input().split())
    if a[s - 1] == -1:
        a[s - 1] = c
    elif a[s - 1] == c:
        pass
    else:
        possibility = False
if a[0] == 0:
    possibility = False

if possibility == True:
    ans = ''
    for i in range(n):
        ans += a[i]
    print(ans)
else:
    print('-1')

### FIXED CODE ###

n, m = map(int, input().split())
a = [-1 for i in range(n)]

for i in range(m):
    s, c = map(int, input().split())
    if a[s - 1] == -1:
        a[s - 1] = c
    elif a[s - 1] == c:
        pass
    else:
        print('-1')
        exit()

if n == 1 and a[0] == 0:
    print('0')
    exit()
if n == 1 and a[0] == -1:
    print('0')
    exit()
if n != 1 and a[0] == 0:
    print('-1')
    exit()

for i in range(n):
    if a[i] == -1:
        a[i] = 0

if a[0] == 0:
    a[0] = 1
ans = ''
for i in range(n):
    ans += str(a[i])
print(ans)
S = input()
count1 = 0
count2 = 0
answer = "WA"

if S[0] == 'A':
    exception = [0]
    for i in range(2,len(S)-1):
        if S[i] == 'C':
            count1 += 1

if count1 == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) > 1:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)


### FIXED CODE ###

S = input()
count = 0
exception = [0]
answer = "WA"

if S[0] == 'A' and S[2:-1].count('C') == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            count += 1

if count == len(S)-2:
    answer = "AC"

print(answer)
n,a,b=map(int,input().split())
ans=0
for i in range(1,n+1):
  num=i
  while num!=0:
    sum+=num%10
    num/=10
  if a<=sum<=b:
    ans+=i
print(ans)

### FIXED CODE ###

n,a,b=map(int,input().split())
ans=0
for i in range(1,n+1):
  num=i
  sum=0
  while num!=0:
    sum+=num%10
    num//=10
  if a<=sum<=b:
    ans+=i
print(ans)
#!/usr/bin/env python
import sys
sys.setrecursionlimit(10**9)
from collections import deque
import heapq
from itertools import combinations
import bisect

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

p=0
q=0
for i in range(n):
    for j in l[i]:
        if j=='(':
            p+=1
        else:
            q+=1
if p!=q:
    print('No')
    exit()
pl=[]
ql=[]
ml=[]
for i in range(n):
    a=l[i]
    p=0
    q=0
    for j in a:
        if j=='(':
            p+=1
        else:
            q+=1
    if p>q:
        pl.append(a)
    elif p<q:
        ql.append(a)
    else:
        ml.append(a)
if pl:
    pl.sort()
if ql:
    ql.sort()
if ml:
    ml.sort()
if pl:
    if pl[0][0]==')':
        print('No')
        exit()
else:
    if ml[0][0]==')':
        print('No')
        exit()

if ql:
    if ql[-1][-1]=='(':
        print('No')
        exit()
else:
    if ml[-1][-1]=='(':
        print('No')
        exit()

print('Yes')


### FIXED CODE ###

#!/usr/bin/env python
import sys
sys.setrecursionlimit(10**9)
from collections import deque
import heapq
from itertools import combinations
import bisect

n=int(input())
l=[]
for i in range(n):
    l.append(list(input()))

p=0
q=0
for i in range(n):
    for j in l[i]:
        if j=='(':
            p+=1
        else:
            q+=1
if p!=q:
    print('No')
    exit()
pl=[]
ql=[]
ml=[]
for i in range(n):
    a=l[i]
    p=0
    q=0
    for j in a:
        if j=='(':
            p+=1
        else:
            q+=1
    if p>q:
        pl.append(a)
    elif p<q:
        ql.append(a)
    else:
        ml.append(a)
if pl:
    pp=[]
    for i in pl:
        d=0
        t=0
        for j in i:
            if j=='(':
                d+=1
            else:
                d-=1
            t=max(t,-d)
        pp.append([t,d])
    pp.sort(key=lambda x: x[0]*(10**6)-x[1])
    dd=0
    for a,b in pp:
        if dd<a:
            print('No')
            exit()
        dd+=b
if ml:
    pp=[]
    for i in ml:
        d=0
        t=0
        for j in i:
            if j=='(':
                d+=1
            else:
                d-=1
            t=max(t,-d)
        pp.append([t,d])
    pp.sort(key=lambda x: x[0]*(10**6)-x[1])
    #d=0
    if not pl:
        dd=0
    for a,b in pp:
        if dd<a:
            print('No')
            exit()
        dd+=b

if ql:
    pp=[]
    for i in ql:
        d=0
        t=0
        for j in range(len(i)):
            if i[len(i)-1-j]==')':
                d+=1
            else:
                d-=1
            t=max(t,-d)
        pp.append([t,d])
    pp.sort(key=lambda x: x[0]*(10**6)-x[1])
    dd=0
    for a,b in pp:
        if dd<a:
            print('No')
            exit()
        dd+=b

if ml:
    pp=[]
    for i in ml:
        d=0
        t=0
        for j in range(len(i)):
            if i[len(i)-1-j]==')':
                d+=1
            else:
                d-=1
            t=max(t,-d)
        pp.append([t,d])
    pp.sort(key=lambda x: x[0]*(10**6)-x[1])
    if not ql:
        dd=0
    for a,b in pp:
        if dd<a:
            print('No')
            exit()
        dd+=b

print('Yes')
input = map(int, input().split())

a = input[0] * input[1]

if (a%2 == 0):
	print("Even")
else:
	print("Odd")


### FIXED CODE ###

input = input().split()

a = int(input[0]) * int(input[1])

if (a%2 == 0):
	print("Even")
else:
	print("Odd")
k, s = list(map(input().split()))
num = 0

for x in range(k+1):
  for y in range(k+1):
    if s-k <= x+y <= s:
      num += 1
      
print(num)

### FIXED CODE ###

k, s = list(map(int, input().split()))
num = 0

for x in range(k+1):
  for y in range(k+1):
    if s-k <= x+y <= s:
      num += 1

print(num)
#include <iostream>
using namespace std;
int main(void){
    
    int i,n;
    int x[101];
    
    cin >> n;
    
    for(i=0; i<n; i++){
        cin >> x[i];
    }
    
    for(i=n-1; i>=0; i--){
        if (i==0){
            cout << x[i] << endl;
        }
        else{
            cout << x[i] << " ";
        }
    }
    
    cout << endl;
    
    return 0;
}



### FIXED CODE ###

n = int(input())

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

for i in data[::-1]:
  if i == data[0]:
    print(i)
  else:
    print(i,"",end="")