Harryxun/stf_run huggingface dataset:
if W % 2 == 0:
    print((H * W) // 2)
elif H == 1 or W == 1:
    print(1)
else :
    odd_row = (W // 2) + 1
    print('odd_row',odd_row)
    even_row = W // 2
    if H % 2 == 1:
        odd_row_num = (H // 2) + 1
        even_row_num = H // 2
        print((odd_row*odd_row_num) + (even_row*even_row_num))
    else :
        print((odd_row+even_row) * (H // 2))

### FIXED CODE ###

H, W = [int(i) for i in input().split()]

if H == 1 or W == 1:
    print(1)
elif W % 2 == 0:
    print((H * W) // 2)
else :
    odd_row = (W // 2) + 1
    even_row = W // 2
    if H % 2 == 1:
        odd_row_num = (H // 2) + 1
        even_row_num = H // 2
        print((odd_row*odd_row_num) + (even_row*even_row_num))
    else :
        print((odd_row+even_row) * (H // 2))
n, k = map(int, input().split())
a = list(map(int, input().split()))
now = 1
cnt = 0
loop = 0
cnts = [-1] * n
cnts[now - 1] = cnt
visited = [False] * n
visited[now - 1] = True
li = [now]

while True:
    cnt += 1
    now = a[now - 1]
    li.append(now)

    if cnt == k:
        print(now)
        exit()
    if visited[now - 1]:
        loop = (cnt - cnts[now - 1])
        pre = cnts[now - 1]
        print(li[pre + (k - pre) % loop])
        exit()

    cnts[now - 1] = cnt
    visited[now - 1] = True


### FIXED CODE ###

a, b, c, k = map(int, input().split())
if k <= (a + b):
    print(min(a, k))
else:
    print(a - min(c, (k - a - b)))
x = int(input())

if x == 0:
    print(1)
els:
    print(0)

### FIXED CODE ###

x = int(input())

if x == 0:
    print(1)
else:
    print(0)
a=int(input())
b=len(str(a))

ans=0

if b%2==0:
    for i in range(int(b/2)):
        c=1+i*2
        ans+=(10**c-1)

else:
    ans+=(a-(10**(b-1)))
    for i in range((b-1)/2):
        e=1+i*2
        ans+=(10**c-1)

print(int(ans))


### FIXED CODE ###

a=int(input())
b=len(str(a))

ans=0

if b%2==0:
    for i in range(int(b/2)):
        c=1+i*2
        ans+=(10**c-(10**(c-1)))

else:
    ans+=(a-(10**(b-1))+1)
    for i in range(int((b-1)/2)):
        e=1+i*2
        ans+=(10**e-(10**(e-1)))

print(int(ans))
a, b = map(int, input().split())
if (a > b):
????????print("a > b")
elif (a < b):
????????print("a < b")
else:
????????print("a == b")

### FIXED CODE ###

a, b = map(int, input().split())
if (a > b):
	print("a > b")
elif (a < b):
	print("a < b")
elif (a == b):
	print("a == b")
A,B = [int(i) for i in input().split()]

flag=0
for i in range(1,10000):
    if int(i*0.08)==A and int(i*0.1)==B:
        ans = i
        flag=1
        break

if flag==1:
    print(ans)
else:
    print(-1)


### FIXED CODE ###

S=input()

if S=='AAA' or S=='BBB':
    print('No')
else:
    print('Yes')
n,l=map(int,input().split())
aji=[]
for i in range(n):
    aji.append(l+i)
e=aji.index(min(abs(aji)))
print(sum(aji)-aji[e])

### FIXED CODE ###

n,l=map(int,input().split())
aji=[]
for i in range(n):
    aji.append(l+i)
aji_abs=[]
for i in aji:
    aji_abs.append(abs(i))
e=aji_abs.index(min(aji_abs))

print(sum(aji)-aji[e])
a, b, k = map(int, input().split())
flag = True

for i in range(100, 1, -1):
    if(a%i == 0)and(b%i == 0)and(flag):
        if(k == 1):
            ans = i
            flag = False
        else:
            k -= 1

print(ans)

### FIXED CODE ###

a, b, k = map(int, input().split())
tmp = 0
for i in range(max(a, b), 0, -1):
    if(a%i == 0)and(b%i == 0):
        tmp += 1
    if tmp == k:
        print(i)
        exit()
from heapq import heapify, heappush, heappop

n = int(input())
G = [[] for _ in range(n + 1)]

for _ in range(n - 1):
    ai, bi, ci = map(int, input().split())
    G[ai].append((bi, ci))
    G[bi].append((ai, ci))

Q, K = map(int, input().split())

# 頂点KからDFSする
d = [None for _ in range(n + 1)]

def dfs(v, dist):
    for (u, cvu) in G[v]:
        if d[u] is None:
            d[u] = dist + cvu
            dfs(u, dist + cvu)

d[K] = 0
dfs(K, 0)

for _ in range(Q):
    xi, yi = map(int, input().split())
    print(d[xi] + d[yi])


### FIXED CODE ###

from heapq import heapify, heappush, heappop

import sys
sys.setrecursionlimit(100000000)

n = int(input())
G = [[] for _ in range(n + 1)]

for _ in range(n - 1):
    ai, bi, ci = map(int, input().split())
    G[ai].append((bi, ci))
    G[bi].append((ai, ci))

Q, K = map(int, input().split())

# # 頂点KからDFSする
# d = [None for _ in range(n + 1)]
# d[K] = 0

# def dfs(v, dist):
#     for (u, cvu) in G[v]:
#         if d[u] is None:
#             d[u] = dist + cvu
#             dfs(u, dist + cvu)

# dfs(K, 0)

# 頂点KからDFSする (heap ver.)
queue = []
d = [None for _ in range(n + 1)]
heappush(queue, (0, K, -1))
while len(queue) > 0:
    dist, index, parent = heappop(queue)
    if d[index] is not None:
        continue
    d[index] = dist
    for (u, cvu) in G[index]:
        if u == parent:
            continue
        heappush(queue, (dist + cvu, u, index))

for _ in range(Q):
    xi, yi = map(int, input().split())
    print(d[xi] + d[yi])
N=int(input())

p=0
for i in range(1,N):
    if i%2==1:
        p +=1
print(p/n)

### FIXED CODE ###

N=int(input())

p=0
for i in range(N+1):
    if i%2==1:
        p +=1
print(p/N)
def dfs(tree, count, p, x):
    count[p] += x
    for i in tree[p]:
        dfs(tree, count, i, x)


def main():
    N, Q = map(int, input().split())
    tree = {i+1: [] for i in range(N)}
    count = {i+1: 0 for i in range(N)}

    for _ in range(N-1):
        a, b = map(int, input().split())
        tree[a].append(b)

    for _ in range(Q):
        p, x = map(int, input().split())
        dfs(tree, count, p, x)

    print(" ".join(map(str, count.values())))


if __name__ == '__main__':
    main()

### FIXED CODE ###

from collections import defaultdict, deque


def main():
    N, Q = map(int, input().split())

    tree = defaultdict(list)
    counter = defaultdict(int)
    for _ in range(N-1):
        a, b = map(int, input().split())
        tree[a].append(b)
        tree[b].append(a)
    for _ in range(Q):
        p, x = map(int, input().split())
        counter[p] += x

    # bfs
    q = deque([1])
    visited = {1}

    while q:
        i = q.popleft()

        for j in tree[i]:
            if j not in visited:
                q.append(j)
                counter[j] += counter[i]
                visited.add(j)

    counts = [counter[i] for i in range(1, N+1)]
    ans = " ".join(map(str, counts))
    print(ans)



if __name__ == '__main__':
    main()
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
d={}
for i in a:
  if i in d:
    d[i][0]+=1
  else:
    d[i]=[1,0]
for i in b:
  if i in d:
    d[i][0]+=1
    d[i][1]+=1
  else:
    d[i]=[1,1]
l=[]
for i in d:
  l.append([d[i][0],i,d[i][1]])
l.sort()
l.reverse()


if l[0][0]>n:
  print("No")
else:
  print("Yes")
  l.append(l[0])
  cc=0
  ansa=[]
  i=1
  while l[i][2]==0:
    i+=1
  j=i+1
  while l[j][2]==0:
    j+=1
  ic,jc=0,0
  for t in a:
    if t==l[0][1]:
      continue
    cc+=1
    if cc>n-l[0][0]:
      ansa.append(l[0][1])
    elif l[i][1]==t:
      ansa.append(l[j][1])
      jc+=1
      if jc==l[j][2]:
        j+=1
        while l[j][2]==0:
          j+=1
        jc=0
    else:
      ansa.append(l[i][1])
      ic+=1
      if ic==l[i][2]:
        i=j
        j+=1
        while l[j][2]==0:
          j+=1
        ic=jc
        jc=0
  ans=[]
  ii=0
  for t in a:
    if t==l[0][1]:
      ans.append(l[i][1])
      ic+=1
      if ic==l[i][2]:
        i=j
        j+=1
        while j!=len(l) and l[j][2]==0:
          j+=1
        ic=jc
        jc=0
    else:
      ans.append(ansa[ii])
      ii+=1
  print(" ".join(map(str,ans)))
  
        

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
d={}
for i in a:
  if i in d:
    d[i][0]+=1
  else:
    d[i]=[1,0]
for i in b:
  if i in d:
    d[i][0]+=1
    d[i][1]+=1
  else:
    d[i]=[1,1]
l=[]
for i in d:
  l.append([d[i][0],i,d[i][1]])
l.sort()
l.reverse()


if l[0][0]>n:
  print("No")
else:
  print("Yes")
  l.append(l[0])
  cc=0
  ansa=[]
  i=1
  while l[i][2]==0:
    i+=1
  j=i+1
  while j!=len(l) and l[j][2]==0:
    j+=1
  ic,jc=0,0
  for t in a:
    if t==l[0][1]:
      continue
    cc+=1
    if cc>n-l[0][0]:
      ansa.append(l[0][1])
    elif l[i][1]==t:
      ansa.append(l[j][1])
      jc+=1
      if jc==l[j][2]:
        j+=1
        while j!=len(l) and l[j][2]==0:
          j+=1
        jc=0
    else:
      ansa.append(l[i][1])
      ic+=1
      if ic==l[i][2]:
        i=j
        j+=1
        while j!=len(l) and l[j][2]==0:
          j+=1
        ic=jc
        jc=0
  ans=[]
  ii=0
  for t in a:
    if t==l[0][1]:
      ans.append(l[i][1])
      ic+=1
      if ic==l[i][2]:
        i=j
        j+=1
        while j!=len(l) and l[j][2]==0:
          j+=1
        ic=jc
        jc=0
    else:
      ans.append(ansa[ii])
      ii+=1
  print(" ".join(map(str,ans)))
N,M = map(int, input().split())
    if M==1 and N==1:
        return 1
    elif M==1:
        return N-2
    elif N==1:
        return M-2
    else:
        return (N-2)*(M-2)

### FIXED CODE ###

N,M = map(int, input().split())
if M==1 and N==1:
    print(1)
elif M==1:
    print(N-2)
elif N==1:
    print(M-2)
else:
    print((N-2)*(M-2))
n=int(input())
A=list(map(int,input().split()))
mod=10**9+7

import fractions
def lcm(a,b):
    return a*b//fractions.gcd(a,b)

def power(a,p):
    T=[a]
    while 2**(len(T))<p:
        T.append(T[-1]**2%p)
    b=bin(p-2)
    ans=1
    for i in range(len(b)-2):
        if int(b[-i-1])==1:
            ans=ans*T[i]%p
    return ans   

l=A[0]
for i in range(n-1):
    l=lcm(l,A[i+1])
s=0
for i in range(n):
    s+=l*power(A[i],mod)%mod
    s%=mod
print(s)

### FIXED CODE ###

n,m=map(int,input().split())
print("Yes" if n==m else "No")
n = input()
print('Yes' if len(set(n[:3])) == 1 or len(set(n[1:4])) == 1 'No')

### FIXED CODE ###

n = input()
print('Yes' if len(set(n[:3])) == 1 or len(set(n[1:4])) == 1 else 'No')
import sys

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z'))]

ans=zip(alf, [0]*26)

for a in sentence:
  if a in alf:
    alf[a] += 1

for key, val in alf:
  print(key + " : " + val)

### FIXED CODE ###

import sys

sentence = sys.stdin.read().lower()
alf=[chr(i) for i in range(ord('a'), ord('z')+1)]

ans=dict(zip(alf, [0]*26))

for a in sentence:
  if a in ans:
    ans[a] += 1

for (key, val) in sorted(ans.items()):
  print(key ,":" , val)
a, b = map(int, raw_imput(), split())

if a < b:
 print 'a < b' 
elif a == b:
 print 'a == b'
elif a > b:
 print 'a > b'

### FIXED CODE ###

a, b = map(int, raw_input().split())
 
if a < b:
 print "a < b"
elif a > b:
 print "a > b"
elif a == b:
 print "a == b"
while 1 == 1:
    a, b = map(int, input().split())
    d = a * b
    if a < b:
        tmp = a
        a = b
        b = tmp

    c = a % b
    while(c != 0):
        a = b
        b = c
        c = a % b

    g = b
    l = d / g

    print(str(g)+" "+str(int(l)))

### FIXED CODE ###

import fileinput

for line in fileinput.input():
    tokens = list(map(int, line.strip().split()))
    a, b = tokens[0], tokens[1]
    d = a * b
    if a < b:
        tmp = a
        a = b
        b = tmp

    c = a % b
    while(c != 0):
        a = b
        b = c
        c = a % b

    g = b
    l = d / g

    print(str(g)+" "+str(int(l)))
many = int(input())
sum_money = 0
for i in range(many):
    money, currency = map(str, input().split())
    if currency == 'JPY':
        sum_money += int(money)
    elif currency == 'BTC':
        sum_money += float(380000 * money)
    else:
        print("Error")
print(sum_money)


### FIXED CODE ###

many = int(input())
sum_money = 0
for i in range(many):
    money, currency = map(str, input().split())
    if currency == 'JPY':
        sum_money += int(money)
    else:
        sum_money += 3.8e5 * float(money)

print(sum_money)
A = int(input())
B = int(input())
C = int(input())
X = int(input())
answer = 0
for i in range(A+1):
	for j in range(B+1):
		for k in range(C+1):
			if X == 500*A + 100*B + 50*C
				answer++
print(answer)


### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
X = int(input())
answer = 0
for i in range(A+1):
	for j in range(B+1):
		for k in range(C+1):
			if X == 500*i + 100*j + 50*k:
				answer+=1
print(answer)
A, B, C = map(int, input().split())
if A =< C and C =< B:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

A, B, C = map(int, input().split())
if A <= C and C <= B:
  print("Yes")
else:
  print("No")
n = input()
v = list(map(int,input().split()))

e = v[::2]
o = v[1::2]

ev = {}
ov = {}
for t in e :
    if t in ev :
        ev[t] = ev[t] + 1
    else :
        ev[t] = 1

for t in o :
    if t in ov:
        ov[t] = ov[t] + 1
    else :
        ov[t] = 1

print(ev)
print(ov)

sorted(ev.items(),key=lambda x : x[1],reverse=True)
sorted(ov.items(),key=lambda x : x[1],reverse=True)

eidx = 0
oidx = 0
et = list(ev.values())[eidx]
ot = list(ov.values())[oidx]

if et == ot :
    if ev[et] > ov[ot] :
        if len(ot) > 1:
            ot = list(ov.values())[oidx+1]
    else:
        if len(et) > 1:
            et = list(ov.values())[eidx+1]

ans = len(e) - et + len(o) - ot
print(ans)

### FIXED CODE ###

n = int(input())
v = list(map(int,input().split()))

e = v[::2]
o = v[1::2]

ev = {}
ov = {}
for t in e :
    if t in ev :
        ev[t] = ev[t] + 1
    else :
        ev[t] = 1

for t in o :
    if t in ov:
        ov[t] = ov[t] + 1
    else :
        ov[t] = 1

ev = sorted(ev.items(),key=lambda x : x[1],reverse=True)
ov = sorted(ov.items(),key=lambda x : x[1],reverse=True)

#li = []
#for elm in list(ev.keys()) :
#    li.append([0,[elm,ev[elm]]])
#for elm in list(ov.keys()) :
    #li.append([1,[elm,ov[elm]]])
#li.sort(key=lambda x : x[1][1],reverse=True)
#print(li)

ee  = ev[0][0]
oo  = ov[0][0]

es0 = ev[0][1]
os0 = ov[0][1]
ans = n - es0 - os0

if ee == oo:
    tmp1 = n - es0
    tmp2 = n - os0

    if len(ev) > 1:
        es1 = ev[1][1]
        tmp1 = n  - es1  - os0

    if len(ov) > 1:
        os1 = ov[1][1]
        tmp2 = n  - es0  - os1

    if tmp1 > tmp2 :
        ans = tmp2 
    else :
        ans = tmp1

print(ans)
a, b, x = [int(i) for i in input().split()]
for i in range(1,10):
  n = (x-b*i)/float(a)
  if n<0:
    if i==9:
      print(0)
    continue
  if len(str(int(n)))==i:
    print(int(n)+1)
    break
  elif i==9:
    print(10**9)

### FIXED CODE ###

s = str(input())
lst = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

print(7-int(lst.index(s)))
#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
array = [map(int,input().split())]
#検問所の入力
b=[]
c=[]
while X+1 <= i <= N: #X+1からNの範囲の整数について 
  if i in array: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1,X): #1からX-1の範囲の整数について
  if i in array: #ある整数が検問所の整数として存在する
    c.append(1)
print(sum(c))

### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-
N,M,X = map(int,input().split()) #整数の入力
a = list(map(int,input().split()))
#検問所の入力
b=[]
c=[]
for i in range(X+1,N): #X+1からNの範囲の整数について 
  if i in a: #ある整数が検問所の整数として存在する
    b.append(1)
for i in range(1,X): #1からX-1の範囲の整数について
  if i in a: #ある整数が検問所の整数として存在する
    c.append(1)
print(min(sum(b),sum(c)))
K = int(input())
if(K % 2 == 0 or K % 5 == 0):
    print(-1)
N = 7
for i in range(K):
    if　N % K == 0:
        print(i + 1)
        break
    else:
        N = ((N * 10) + 7) % K

### FIXED CODE ###

K = int(input())

t = 7
for i in range(K):
    if t % K == 0:
        print(i + 1)
        break
    t = (t * 10 + 7) % K
else:
    print(-1)
from sys import stdin
import math
a=int(stdin.readline())
A=stdin.readline().split()
sum=0
for k in range(0,a+1):
    sum+=int(A[k])

sum-=int(A[a])
ver=1
lay=1
K=0

for l in range(0,a):
    if lay-int(A[l])<=0:
        print(-1)
        K=1
        break
    if (lay-int(A[l]))*2-sum+int(A[l])<=int(A[a]):
        lay=(lay-int(A[l]))*2
        ver+=lay
        sum-=int(A[l])
        T=l
    else:
        lay-=int(A[l])
        sum-=int(A[l])
        x=lay-sum-int(A[a])
        if x==0:
           ver+=lay
        else:
           lay=sum+int(A[a])
           ver+=lay
        T=l
        break

if K==0:
    for u in range(T+1,a):
        lay -= int(A[u])
        sum -= int(A[u])
        ver+=lay

if K==0:
    print(ver)

### FIXED CODE ###

from sys import stdin

a=int(stdin.readline())
A=stdin.readline().split()
sum=0
for k in range(0,a+1):
    sum+=int(A[k])

sum-=int(A[a])
ver=1
lay=1
K=0
T=0

if a==0:
    if A[0]!='1':
        print(-1)
        K=1
    else:
        print(1)
        K=1

for l in range(0,a):
    if lay-int(A[l])<=0:
        print(-1)
        K=1
        break
    if (lay-int(A[l]))*2<int(A[a]) and l==(a-1):
        print(-1)
        K=1
        break
    if (lay-int(A[l]))*2-sum+int(A[l])<=int(A[a]):
        lay=(lay-int(A[l]))*2
        ver+=lay
        sum-=int(A[l])
        T=l
    else:
        lay-=int(A[l])
        sum-=int(A[l])
        x=lay-sum-int(A[a])
        if x==0:
           ver+=lay
        elif x>0:
            print(-1)
            K=1
        else:
           lay=sum+int(A[a])
           ver+=lay
        T=l
        break

if K==0:
    for u in range(T+1,a):
        lay -= int(A[u])
        sum -= int(A[u])
        ver+=lay

if K==0:
    print(ver)
N = int(input())
A = list(map(int, input.split()))

if N == len(set(A)): print('Yes')
else: print('No')


### FIXED CODE ###

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

if N == len(set(A)): print('YES')
else: print('NO')
n = int(input())
graph = [[] for _ in range(n)]
for _ in range(n-1):
  a, b, c = map(int, input().split())
  a-=1
  b-=1
  graph[a].append((b, c))
  graph[b].append((a, c))
q, k = map(int, input().split())
k-=1
xy = []
for _ in range(q):
  x, y = map(int, input().split())
  xy.append((x-1, y-1))

l = [0]*(n+1)
def DFS(node, p_node, length):
  l[node] = length
  for i, j in graph[node]:
    if i==p_node:
      continue
    DFS(i, node, length+j)
DFS(k, -1, 0)
for x, y in xy:
  print(l[x]+l[y])

### FIXED CODE ###

import sys
n = int(input())
graph = [[] for _ in range(n)]
for _ in range(n-1):
    a, b, c = map(int, input().split())
    a-=1
    b-=1
    graph[a].append((b, c))
    graph[b].append((a, c))
q, k = map(int, input().split())
k -= 1
xy = []
for _ in range(q):
    x, y = map(int, input().split())
    x-=1
    y-=1
    xy.append((x, y))

def DFS(node, p_node, length):
    l[node] = length
    for i, j in graph[node]:
        if i==p_node:
            continue
        DFS(i, node, length+j)
sys.setrecursionlimit(2 * n)
l = [0]*n
DFS(k, -1, 0)
for x, y in xy:
    print(l[x]+l[y])
import sys
import math
import collections
import bisect
import copy

# import numpy as np

sys.setrecursionlimit(10 ** 7)
INF = 10 ** 16
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))
na1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))


# ===CODE===


def main():
    n = ni()
    yes = dict()
    for i in range(3, 1000):
        if (i * (i - 1)) % 2 == 0:
            yes[(i * (i - 1)) // 2] = [i, i - 1]

    if n not in yes.keys():
        print("No")
        exit(0)

    xl, xs = yes[n]

    ans = [[] for _ in range(xl)]
    cnt = 1
    idx = 0
    prev = -1
    while cnt <= n and prev != cnt:
        prev = cnt
        for i in range(idx, idx + 3):
            for j in range(xs):
                if i == idx and j == 0:
                    ans[idx + 2].append(cnt)
                if i == idx + 2 and j == xs - 1:
                    continue
                ans[i].append(cnt)
                if j != 0 and j != xs - 1:
                    ans[idx + 2 + j].append(cnt)
                if j != xs - 1:
                    cnt += 1
        idx += 3
        xs -= 3

    for ansi in ans:
        print(*ansi, sep=" ")


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import math
import collections
import bisect
import copy

# import numpy as np

sys.setrecursionlimit(10 ** 7)
INF = 10 ** 16
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))
na1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))


# ===CODE===


def main():
    n = ni()
    yes = dict()
    for i in range(3, 1000):
        if (i * (i - 1)) % 2 == 0:
            yes[(i * (i - 1)) // 2] = [i, i - 1]
    tmp = max(yes)

    if n == 1:
        print("Yes")
        print(2)
        print(1, 1)
        print(1, 1)
        exit(0)


    if n not in yes.keys():
        print("No")
        exit(0)

    xl, xs = yes[n]

    ans = [[] for _ in range(xl)]
    cnt = 1
    idx = 0
    while xs >= 0:
        tmp = cnt
        for i in range(idx, min(xl, idx + 3)):
            for j in range(xs):
                if cnt == tmp + 3 * (xs - 1):
                    ans[i].append(tmp)
                    break
                else:
                    ans[i].append(cnt)

                if j != 0 and j != xs - 1:
                    ans[idx + 2 + j].append(cnt)
                if j != xs - 1:
                    cnt += 1
        idx += 3
        xs -= 3

    print("Yes")
    print(len(ans))
    for ansi in ans:
        print(len(ansi), *ansi, sep=" ")


if __name__ == '__main__':
    main()
#coding: utf-8

import sys
import math

l = []
for line in sys.stdin:
    l.append(int(line))

check = 0
point_list = []
for i in range(len(l)):
    if check == 0:
        last_row = i + l[i]
        check = 1
        continue
    else:
        point_list.append(i)
        if i == last_row:
            point_list.sort()
            point_list = point_list[1:-1]
            ave = sum(point_list)/len(point_list)
            print math.floor(ave)
            check = 0

### FIXED CODE ###

while True:
    n = int(raw_input())
    if n == 0:
        break
    else:
        l = []
        for i in range(n):
            num = int(raw_input())
            l.append(num)
            l.sort()
        l = l[1:-1]
        ave = float(sum(l))/len(l)
        print int(ave)
# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools

## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
 
H,W=map(int, input().split())
S = []

S.append(['.']*(W+2))
for _ in range(H):
    S.append(['.']+list(input())+['.'])
S.append(['.']*(W+2))

for i in range(1,W+1):
    for j in range(1,H+1):
        if S[i][j] == "#" and if S[i-1][j] == "." and S[i+1][j] == "." and  S[i][j-1] == "." and  S[i][j+1]== ".":
            print("No")
            sys.exit()

print("Yes")

### FIXED CODE ###

# -*- coding: utf-8 -*-
 
## Library
 
import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools

## input
 
# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
 
H,W=map(int, input().split())
S = []

S.append(['.']*(W+2))
for _ in range(H):
    S.append(['.']+list(input())+['.'])
S.append(['.']*(W+2))

for i in range(1,H-1):
    for j in range(1,W-1):
        if S[i][j] == "#" and S[i-1][j] == "." and S[i+1][j] == "." and  S[i][j-1] == "." and  S[i][j+1]== ".":
            print("No")
            sys.exit()

print("Yes")
a,b,c,d=0
N=int(input())
S=[input() for _ in range(N)]
for i in range(N):
    if S[i]=='AC':
        a=a+1
    elif S[i]=='WA':
        b=b+1
    elif S[i]=='TLE':
        c=c+1
    elif S[i]=='RE':
        d=d+1
print('AC ×　{}'.format(a))        
print('WA ×　{}'.format(b))       
print('TLE ×　{}'.format(c))       
print('RE ×　{}'.format(d))  

### FIXED CODE ###

n = int(input())
ans_ac = 0
ans_wa = 0
ans_tle = 0
ans_re = 0

for i in range(n):
    s = input()
    if s == 'AC':
        ans_ac += 1
    elif s == 'WA':
        ans_wa += 1
    elif s == 'TLE':
        ans_tle += 1
    else:
        ans_re += 1
        
print('AC x '+str(ans_ac))
print('WA x '+str(ans_wa))
print('TLE x '+str(ans_tle))
print('RE x '+str(ans_re))