Harryxun/stf_run huggingface dataset:
def OorC():
    if (T in lst) == True:
        if lst2[lst.index(T)] % 2 == 0:
            lst2[lst.index(T)] += 1
            print "Opened by " + T
        else:
            lst2[lst.index(T)] += 1
            print "Closed by " + T
    else:
        print "Unknown " + T
        

while 1:
    N = int(input())
    if N == 0:
        break
    lst = []
    lst2 = []
    for i in range(N):
        lst.append(str(raw_input()))
        lst2.append(0)
    M = int(input())
    for j in range(M):
        T = str(raw_input())
        OorC()
        

### FIXED CODE ###

N = int(input())
a = 0
lst = []
for i in range(N):
    lst.append(str(raw_input()))
M = int(input())
for j in range(M):
    T = str(raw_input())
    if (T in lst) == True:
        if a == 0:
            a = 1
            print "Opened by " + T
        else:
            a = 0
            print "Closed by " + T
    else:
        print "Unknown " + T
A,B,C,D,E,F=map(int,input().split(' '))
water = set()
for a in range(0,F,100*A):
  for b in range(0,F,100*B):
    if a+b <= F:
      water.add(a+b)
    else:
      break
sugars = set()
for c in range(0,F,C):
  for d in range(0,F,D):
    if c+d <= F:
      sugars.add(c+d)
    else:
      break
density = 0
for x in water:
  for y in sugars:
    if x+y != 0 and x+y <= F and E*x >= 100*y and density < y/(x+y):
      density = y/(x+y)
      sugar = y
      content = x+y
print(content,sugar)

### FIXED CODE ###

A,B,C,D,E,F=map(int,input().split(' '))
water = set()
for a in range(0,F,100*A):
  for b in range(0,F,100*B):
    if a+b <= F:
      water.add(a+b)
    else:
      break
sugars = set()
for c in range(0,F,C):
  for d in range(0,F,D):
    if c+d <= F:
      sugars.add(c+d)
    else:
      break
density = 0
sugar = 0
content = 100*A
for x in water:
  for y in sugars:
    if x+y != 0 and x+y <= F and E*x >= 100*y and density < y/(x+y):
      density = y/(x+y)
      sugar = y
      content = x+y
print(content,sugar)
x = A+B
y = A-B
z = A*B

print(max(x,y,z))

### FIXED CODE ###

A, B = map(int, input().split())
x = A+B
y = A-B
z = A*B

print(max(x,y,z))
N, K=map(int, input().split())
A=list(map(int, input().split()))
base=0
for i in range(N-1):
  for j in range(i+1:N):
    if A[i]>A[j]:
      base+=1
rep=K*(K+1)//2
ans=base*rep
print(ans)

### FIXED CODE ###

N, K=map(int, input().split())
a=list(map(int, input().split()))
A=a*2
base=0
matagu=0
for i in range(N):
  for j in range(i+1,2*N):
    if A[i]>A[j]:
      if j>=N:
        matagu+=1
      else:
        base+=1
baserep=K
matagurep=K*(K-1)//2
waru=10**9+7
ans=(base*baserep+matagu*matagurep)%waru
print(ans)
import numpy as np
import collections

N = int(input())
V = np.array(list(map(int, input().split())))

if N == len(np.where(V == V[0])[0]):
    print(N // 2)
else:
    v0 = [V[i] for i in range(0, N - 1, 2)]
    v1 = [V[i] for i in range(1, N, 2)]
    v0_items = dict(collections.Counter(v0).items())
    v1_items = dict(collections.Counter(v1).items())
    v0_max_key = max(v0_items, key=v0_items.get)
    v1_max_key = max(v1_items, key=v1_items.get)
    
    if v0_max_key == v1_max_key:
        count = v0_items.pop(v0_max_key)
        count = (N // 2) - v1_items.pop(v1_max_key)
        tmp1 = v0_items.pop(v0_max_key)
        tmp2 = v1_items.pop(v1_max_key)
        count += max(tmp1, tmp2)
        print(count)
    else:
        count = (N // 2) - max(collections.Counter(v0).values())
        count += (N // 2) - max(collections.Counter(v1).values())
        print(count)

### FIXED CODE ###

import numpy as np
import collections

N = int(input())
V = np.array(list(map(int, input().split())))

if N == len(np.where(V == V[0])[0]):
    print(N // 2)
else:
    v0 = [V[i] for i in range(0, N - 1, 2)]
    v1 = [V[i] for i in range(1, N, 2)]
    v0_items = dict(collections.Counter(v0).items())
    v1_items = dict(collections.Counter(v1).items())
    v0_max_key = max(v0_items, key=v0_items.get)
    v1_max_key = max(v1_items, key=v1_items.get)
    
    if v0_max_key == v1_max_key:
        count = v0_items.pop(v0_max_key)
        count = (N // 2) - v1_items.pop(v1_max_key)
        tmp1 = v0_items.pop(max(v0_items, key=v0_items.get))
        tmp2 = v1_items.pop(max(v1_items, key=v1_items.get))
        count += (N // 2) - max(tmp1, tmp2)
        print(count)
    else:
        count = (N // 2) - max(collections.Counter(v0).values())
        count += (N // 2) - max(collections.Counter(v1).values())
        print(count)
c = [list(map(int, input().split())) for i in range(3)]

for i in range(3):
    c[i] = [j - c[i][0] for j in c[i]]
    
if c[0] == c[1] and c[1] == c[2]:
    print("Yes")
else:
    print("No")

    


### FIXED CODE ###

N = int(input())
A = int(input())

a = N % 500
if a <= A:
    print("Yes")
else:
    print("No")
def main():
    N = int(input())
    X = int(input(), 2)

    def popcount(num):
        return bin(num).count("1")
    
    popc_X = popcount(X)
    pop_table = {i: [popcount(i), 0, 0] for i in range(1, N+1)}
    
    def f(x, factor):
        temp = x
        temp %= (popc_X + factor)
        count = 1
        visited = []
        
        while temp > 0:
            if pop_table[temp][1] == 0:
                pop_table[temp][1] = count
            else:
                if pop_table[temp][2]:
                    count += pop_table[temp][1]
                    break

            if pop_table[temp][2] == 0:
                visited.append(temp)
            temp %= pop_table[temp][0]
            count += 1

        for v in visited:
            pop_table[v][1] = count - pop_table[v][1]
            pop_table[v][2] = 1
        return count
    

    # ans = [0]*N
    for i in range(N-1, -1, -1):
        xi = X ^ (1 << i)
        # print(xi, "xi")
        if X & (1<<i):
            factor = -1
        else:
            factor = 1
        print(f(xi, factor))
    # for a in ans:
    #     print(a)

main()

### FIXED CODE ###

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

# pops = [0]*(N+20)
for i in range(N):
    tmp = 0
    if X[i] == "0":
        # +
        tmp = (res0 + pow(2, N-i-1, mod0))%mod0
    else:
        if pop_x == 1:
            print(0)
            continue
        tmp = (res1 - pow(2, N-i-1, mod1))%mod1
    
    if tmp == 0:
        print(1)
        continue
    cnt = 1
    while tmp != 0:
        pop = bin(tmp).count("1")
        tmp %= pop
        cnt += 1
    print(cnt)
import math
def solution():
    a, b, h, m  = map(int, input().split())
    return round((a**2 + b**2 -2*a*b*math.cos(2*math.pi*(h/12 - m/60)))**0.5, 9)

print(solution())

### FIXED CODE ###

def solution():
    n = int(input())
    bon = [3]
    pon = [0, 1, 6, 8]
    last = n % 10
    if last in bon:
        return 'bon'
    elif last in pon:
        return 'pon'
    else:
        return 'hon' 
    
print(solution())
from math import log2
import sys
N, K = [int(x) for x in input().split()]
a = [int(y) for y in input().split()]


def nketame(a, n):
    return (a & (1 << n)) >> n


def f(x):
    return sum([y ^ x for y in a])


if K == 0:
    print(f(0))
    sys.exit(1)

ans = []
for i in range(1, int(log2(K))+1):
    b = 1
    for j in range(i):
        b = b << 1
        c = [nketame(x, j) for x in a].count(1)
        if c < N-c:
            b += 1
    ans.append(b)
# print(ans)
# print(max(ans))
hprint(f(max(ans)))


### FIXED CODE ###

from math import log2
import sys
N, K = [int(x) for x in input().split()]
a = [int(y) for y in input().split()]


def nketame(a, n):
    return (a & (1 << n)) >> n


def f(x):
    return sum([y ^ x for y in a])


if K == 0:
    print(f(0))
else:
    ans = []
    b = 0
    for i in range(int(log2(K))+1, 0, -1):
        # print("i", i)
        c = [nketame(x, i-1) for x in a].count(1)
        if c < N-c:
            bb = b + (1 << (i-1))
        else:
            bb = b
        if bb <= K:
            b = bb
            ans.append(b)
    # print(ans)
    print(f(max(ans)))

    # 全列挙
    # print("true ", max([(x, f(x)) for x in range(K+1)], key=lambda x: x[1]))
#再帰を使って各ノードのカウンタの値を決定
def dfs(v,p,G,c):#vは1始まり
    for u in G[v]:
        if u!=p:
            c[u-1]+=c[v-1]
            dfs(u,v,G,c) 

N,Q = list(map(int,input().split()))
a=[0]*(N-1)
b=[0]*(N-1)
G={}
for i in range(N-1):
    a[i],b[i] = list(map(int,input().split()))
for i in range(N):
    G[i+1]=[]
p=[0]*Q
x=[0]*Q
for i in range(Q):
    p[i],x[i] = list(map(int,input().split()))

#グラフの作成
for i in range(N-1):
    G[a[i]].append(b[i])
    G[b[i]].append(a[i])

c=[0]*N
for i in range(Q):
    c[p[i]-1] += x[i]

dfs(1,-1,G,c)

ans = ' '.join([str(x) for x in c])

print(ans)

### FIXED CODE ###

'''
pythonの再帰は10^5timesですら厳しい
import sys
sys.setrecursionlimit(10000000)

def dfs(v,p,G,c):
    for u in G[v]:
        if u!=p:
            c[u]+=c[v]
            dfs(u,v,G,c) 
'''
from collections import deque

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

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

p=[0]*Q
x=[0]*Q
c=[0]*N
for i in range(Q):
    p,x = list(map(int,input().split()))
    p-=1
    c[p] += x

stack=deque([0])
parent = [-1]*N

while(stack):
    v = stack.pop()
    for u in G[v]:
        if u!=parent[v]:
            c[u]+=c[v]
            parent[u]=v
            stack.appendleft(u)


ans = ' '.join([str(x) for x in c])

print(ans)
H, W = map(int, input().split())

if W % 2 == 0:
  res = H * W / 2
else:
  res =  H * (W//2) + int(H/2) + 1
print('{0:d}'.format(res))

### FIXED CODE ###

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

if (H*W) % 2 == 0:
  if H == 1 or W == 1:
    res = 1
  else:
    res = int(H * W / 2)
else:
  if H == 1 or W == 1:
    res = 1
  else:
    res =  int(H * (W//2) + int(H/2) + 1)
print('{0:d}'.format(res))
inp = input()
a = [input() for i in range(inp)]
a.sort()
a.reverse()
print(a[0])
print(a[1])
print(a[2])

### FIXED CODE ###

import sys

a = []
for line in sys.stdin:
    a.append(int(line))
a.sort()
a.reverse()
print(a[0])
print(a[1])
print(a[2])
import heapq

N, K = map(int, input().split())
sushi = []
for i in range(N):
    t, d = map(int, input().split())
    heapq.heappush(sushi, (-d, t))

total = 0
types = set()
remain = []
for i in range(K):
    d, t = heapq.heappop(sushi)
    total -= d
    if t not in types:
        types.append(t)
    else:
        # 余りの寿司はremainにappend
        heapq.heappush(remain, -d)

types_len = len(types)
ans = total + types_len ** 2

while sushi and remain:
    d, t = heapq.heappop(sushi)
    if t not in types:
        types.append(t)
        remain_d = heapq.heappop(remain)
        total = total - d - remain_d
        types_len += 1
        ans = max(ans, total + types_len ** 2)

print(ans)


### FIXED CODE ###

import heapq

N, K = map(int, input().split())
sushi = []
for i in range(N):
    t, d = map(int, input().split())
    heapq.heappush(sushi, (-d, t))

total = 0
types = set()
remain = []
for i in range(K):
    d, t = heapq.heappop(sushi)
    total -= d
    if t not in types:
        types.add(t)
    else:
        # 余りの寿司はremainにappend
        heapq.heappush(remain, -d)

types_len = len(types)
ans = total + types_len ** 2

while sushi and remain:
    d, t = heapq.heappop(sushi)
    if t not in types:
        types.add(t)
        remain_d = heapq.heappop(remain)
        total = total - d - remain_d
        types_len += 1
        ans = max(ans, total + types_len ** 2)

print(ans)
k=int(input())

if k%2==0 or k%5==0:
    print('-1')

else:
    num=7%k
    ans=1

    while num != 0:

        num=(num*10+7)%k
        ans+=1

print(ans)


### FIXED CODE ###

k=int(input())

if k%2==0 or k%5==0:
    print('-1')

else:
    num=7%k
    ans=1

    while num != 0:

        num=(num*10+7)%k
        ans+=1

    print(ans)
def main():
  from collections import deque,defaultdict
  import sys
  input = sys.stdin.readline

  def min_kinder(kinder_max):
    ret = float('inf')
    for x in kinder_max:
      if x==0:
        continue
      else:
        ret = min(ret,x)
    return(ret)
  N,Q = map(int,input().split())
  AB = [list(map(int,input().split())) for _ in range(N)]
  CD = [list(map(int,input().split())) for _ in range(Q)]
  kinder = [defaultdict(int) for _ in range(2*10**5 + 5)]
  kinder_max = [0] * (2*10**5 + 5)
  kinder_num = [0] * (2*10**5 + 5)

  for a,b in AB:
    kinder[b][a] += 1
    kinder_max[b] = max(kinder_max[b], a)
    kinder_num[b] += 1

  equality = min_kinder(kinder_max)
  for c,d in CD:
    a,b = AB[c-1]
    AB[c-1][1] = d
    kinder[b][a] -= 1
    kinder[d][a] += 1
    kinder_num[b] -= 1
    kinder_num[d] += 1
    
    if kinder[b][a]==0:
      kinder[b].pop(a)

    if (kinder_max[b]==equality)or(kinder_max[d]==equality):
      judge = True
    else:
      judge = False

    if kinder_max[b]==a:
      if kinder[b][a]!=0:
        pass
      else:
        if kinder_num[b]==0:
          kinder_max[b] = 0
        else:
          x = 0
          for key,value in kinder[b].items():
            if value<=0:
              continue
            else:
              x = max(x,key)
          kinder_max[b] = x

    kinder_max[d] = max(kinder_max[d], a)

    if judge:
      equality = min_kinder(kinder_max)

    print(equality)
    
main()

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
if N==1:
  print(1)
else:
  A.sort()
  import numpy as np

  l = np.array([0] * (10**6 + 10))
  m = np.array([0] * (10**6 + 10))
  for i in range(N):
    l[A[i]] += 1
    m[A[i]] += 1

  ans = 0
  length = len(l)
  for i in range(length):
    if l[i]==1:
      ans += 1
    
    if m[i]>=1:
      l[i::i] = 0

  print(ans)
k = input()
s = input()

if len(s) <= int(k):
  print(s)
else:
  print(s[0:k] + "...")

### FIXED CODE ###

k = input()
s = input()

if len(s) <= int(k):
  print(s)
else:
  print(s[0:int(k)] + "...")
import math

N = int(input())
a = list(map(int, input().split()))
avg = math.floor(sum(a)/len(a))
sums = []
for i in range(1, avg+1):
    sum = 0
    for j in range(N):
        sum += (a[j]-avg)**2
    sums.append(sum)
print(min(sums))


### FIXED CODE ###

N = int(input())
a = list(map(int, input().split()))
avg = round(sum(a)/N)
sums = []
for i in range(min(a), avg+1):
    s = 0
    for j in range(N):
        s += (i-a[j])**2
    sums.append(s)
print(min(sums))
import math
R=map(int,input())
Z=2*R*math.pi
print(Z)

### FIXED CODE ###

import math

r=float(input())
z=r*float(2)*math.pi

print(z)
n = int(input())
string = input()

r=g=b=0

for idx, s in enumerate(string):
    if s == 'R':
        r+=1
    elif s == 'B':
        b+=1
    elif s == 'G':
        g+=1

ans = r*g*b

for i in range(n):
    for k in range(i+1, n):
        if string[i] != string[k]:
            if (k+i)%2 == 0 and len(set(string[i], string[k], string[(k+i)//2])) ==3:
                ans -= 1

print(ans)
            



### FIXED CODE ###

n = int(input())
string = input()
r = 0
g = 0
b = 0
for c in string:
    if c == 'R':
        r += 1
    elif c == 'G':
        g += 1
    else:
        b += 1
ans = r*g*b
for i in range(n):
    for j in range(i+1, n):
        if 2*j - i >= n:
            break
        
        if string[i] != string[j] and string[i] != string[2*j-i] and string[j] != string[2*j-i]:
            ans -= 1
print(ans)
n = input()

if n == 'A':
  print('T')
  
elif n == 'T'
  print('A')
  
elif n == 'C'
  print('G')
  
elif n == 'G'
  print('C')

else:
  pass


### FIXED CODE ###

n = input()

if n == 'A':
  print('T')
  
elif n == 'T':
  print('A')
  
elif n == 'C':
  print('G')
  
elif n == 'G':
  print('C')
import numpy as np
n=int(input())
l=list(map(float,input().split()))
t=(n+1)//2
dp=[[-1 for i in range(n+1)]for i in range(n+1)]
def recur(i,k,ans):
    if i==n:
        # global ans
        if k>=t:
            return 1
            
        return 0
    # a=dp[i][k]
    # dp[i][k]=recur(i+1,k+1,p*l[i],ans)+recur(i+1,k,p*(1-l[i]),ans)
    # b=dp[i][k]
    # if a!=0 and a!=b:
    #     print(a,b)
    # return dp[i][k]
    if dp[i][k]!=-1:
        return dp[i][k]
    
    dp[i][k]=l[i]*recur(i+1,k+1,ans)+recur(i+1,k,ans)*(1-l[i])
    # print(dp[i][k])
    # if dp[i+1][k+1] == 0:
    #     dp[i+1][k+1]=recur(i+1,k+1,p*l[i])
    # if dp[i+1][k]==0:
    #     dp[i+1][k]=recur(i+1,k,p*(1-l[i]))
    return dp[i][k]
# ans=0
# print(dp)
print(recur(0,0,0))
# print(dp)
# print(ans)
            

### FIXED CODE ###

# import numpy as np
n=int(input())
l=[0]+list(map(float,input().split()))
n+=1
dp=[[0 for i in range(n)]for i in range(n)]
dp[0][0]=1
for i in range(1,n):
    for j in range(i+1):
        if j==0:
            dp[i][j] = (1-l[i])*dp[i-1][j]
        else:
            dp[i][j]=(1-l[i])*(dp[i-1][j])+l[i]*dp[i-1][j-1]
ans=0
# print(np.array(dp))
for i in range((n)//2,n):
    ans+=dp[-1][i]
print(ans)
N = int(input())
a = [int(input()) for i in range(N)]
flag = True

for i in range(1, N):
  if a[N-1] < a[i]:
    flag = False

if flag:
  print('Yay!')
else:
  print(':(')


### FIXED CODE ###

a = [int(input()) for i in range(6)]
flag = True

for i in range(6):
  for j in range(i+1, 6):
    if abs(a[i] - a[j]) > a[5]:
      flag = False

if flag:
  print('Yay!')
else:
  print(':(')
N = int(input())
ls = list(map(int, input().split(' ')))
d = {}
for l in ls:
    if l in d:
        d[l] += 1
    else:
        d[l] = 1

m = 0
keys = sorted(d.keys())
for k in keys:
    c = d[k]
    if (k-1) in d:
        c += d[k-1]
    if (k+1) in d:
        c += d[k+1]
    m = max(m,c)
print(m)
N = int(input())
ls = list(map(int, input().split(' ')))
d = {}
for l in ls:
    if l in d:
        d[l] += 1
    else:
        d[l] = 1

m = 0
for k in range(1, 100002):
    if k in d:
        c += d[k]
    if (k-1) in d:
        c += d[k-1]
    if (k+1) in d:
        c += d[k+1]
    m = max(m,c)
print(m)


### FIXED CODE ###

N = int(input())
ls = list(map(int, input().split(' ')))
d = {}
for l in ls:
    if l in d:
        d[l] += 1
    else:
        d[l] = 1

m = 0
keys = sorted(d.keys())
for k in keys:
    c = d[k]
    if (k-1) in d:
        c += d[k-1]
    if (k+1) in d:
        c += d[k+1]
    m = max(m,c)
print(m)
n=int(input())
h=list(map(int,input().split()))

score = [0]*n
for i in range(n-2,-1,-1):
    if H[i] >= H[i+1]:
        score[i] = score[i+1] + 1
 
print(max(score))

### FIXED CODE ###


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

score = [0]*n
for i in range(n-2,-1,-1):
    if h[i] >= h[i+1]:
        score[i] = score[i+1] + 1
 
print(max(score))
for x in range(1,10):
    for y in range(1,10):
        print "%d??%d=%d" % (x, y , x*y) 

### FIXED CODE ###

for x in range(1,10):
    for y in range(1,10):
        print "%dx%d=%d" % (x, y , x*y)
s = input()
t = input()
len_s = len(s)
len_t = len(t)
dp = [[0]*(len_t+1) for _ in range(len_s+1)]
# dp[i][j]はs[i],t[j]までで、最長の部分列の長さ
for i in range(len_s):
    for j in range(len_t):
        if s[i] == t[i]:
            dp[i+1][j+1] = max(dp[i][j]+1, dp[i+1][j], dp[i][j+1])
        else:
            dp[i+1][i+1] = max(dp[i+1][j], dp[i][j+1])
print(dp)
ans = ""
while len_t>0 and len_s>0:
    if dp[len_s][len_t] == dp[len_s-1][len_t]:
        len_s -= 1
    elif dp[len_s][len_t] == dp[len_s][len_t-1]:
        len_t -= 1
    else:
        ans += s[len_s-1]
        len_s -= 1
        len_t -= 1
print(ans[::-1])

### FIXED CODE ###

s = input()
t = input()
len_s = len(s)
len_t = len(t)
dp = [[0]*(len_t+1) for _ in range(len_s+1)]
# dp[i][j]はi、j文字目までのs[i],t[j]で、最長の部分列の長さ
for i in range(len_s):
    for j in range(len_t):
        if s[i] == t[j]:
            dp[i+1][j+1] = max(dp[i][j]+1, dp[i+1][j], dp[i][j+1])

        dp[i+1][j+1] = max(dp[i+1][j+1], dp[i+1][j], dp[i][j+1])
#print(dp)
ans = ""
while len_t > 0 and len_s > 0:
    if dp[len_s][len_t] == dp[len_s-1][len_t]:
        len_s -= 1
    elif dp[len_s][len_t] == dp[len_s][len_t-1]:
        len_t -= 1
    else:
        ans += s[len_s-1]
        len_s -= 1
        len_t -= 1
print(ans[::-1])
import numpy as np
def main():
    N, M = map(int, input().split())
    f = np.zeros((M,N))
    for i in range(M):
        l, r = map(int, input().split())
        f[i, l-1:r] += 1
    ans = sum(np.all(f, axis=0))
    print(ans)
main()

### FIXED CODE ###

import numpy as np
def main():
    N, M = map(int, input().split())
    maxl = -float('inf')
    minr = float('inf')
    for _ in range(M):
        l, r = map(int, input().split())
        if l >= maxl:
            maxl = l
        if r <= minr:
            minr = r
    val = minr - maxl + 1
    if val >= 0:
        print(val)
    else:
        print(0)
main()
W, H, x, y = map(int, input().split())
if W % 2 == 0 and H % 2 == 0 and x, y = W/2, H/2 :
    print(str(W*H/2)+ ' ' + str(1))
else:
    print(str(w*H/2)+ ' ' + str(0))


### FIXED CODE ###

W, H, x, y = map(int, input().split())
if W/2 == x and H/2 == y:
    print(str(W*H/2)+ ' ' +str(1))
else:
    print(str(W*H/2)+ ' ' +str(0))
while True:
    a,b = map(int,input().split())
    if a ==0 and b ==0:
        break
    else:
        if a<b:
            a,b =b,a
        print(a,b)else:
        


### FIXED CODE ###

while True:
    a,b = map(int,input().split())
    if a ==0 and b ==0:
        break
    else:
        if a<=b:
            print(a,b)
        else:
            a,b =b,a
            print(a,b)
def calc(n):
    damage = (b * n)
    d = [max(dd - damage, 0) for dd in h]
    a_num = 0
    for i in range(len(d)):
        a_num += max(0, 1 + (d[i]-1) // (a - b))
    if a_num <= n:
        return True
    return False

n, a, b = map(int, input().split())
h = []
for _ in range(n):
    h.append(int(input()))
ans = 0
h.sort()

left = 0
right = (h[-1] + 1) // (b)

while (right - left) > 1:
    middle = (left + right) // 2
    if calc(middle):
        right = middle
    else:
        left = middle
print(middle)

### FIXED CODE ###

def calc(n):
    damage = (b * n)
    d = [max(dd - damage, 0) for dd in h]
    a_num = 0
    for i in range(len(d)):
        a_num += max(0, 1 + (d[i]-1) // (a - b))
    if a_num <= n:
        return True
    return False

n, a, b = map(int, input().split())
h = []
for _ in range(n):
    h.append(int(input()))
ans = 0
h.sort()

left = 0
right = 10000000000

while (right - left) > 1:
    middle = (left + right) // 2
    if calc(middle):
        right = middle
    else:
        left = middle
print(right)
a = (int(i) for i in input().split()) 
b = a[0] + a[1]
c= a[0] - a[1]
d= a[0] * a[1]

print(max([b,c,d])

### FIXED CODE ###

a,b= (int(i) for i in input().split()) 
c = a + b
d = a-b
e = a*b

print(max([c,d,e]))
n = int(input())

if n != 2:
    if n % 2 == 0:
        n += 1
    while not is_prime(n):
        n += 2
    print(n)
else:
    print(n)

def is_prime(q):
    if q == 2: return True
    if q < 2 or q&1 == 0: return False

    d = (q-1)>>1
    while d&1 == 0:
        d >>= 1
    
    for i in xrange(k):
        a = random.randint(1,q-1)
        t = d
        y = pow(a,t,q)
        while t != q-1 and y != 1 and y != q-1: 
            y = pow(y,2,q)
            t <<= 1
        if y != q-1 and t&1 == 0:
            return False
    return True

### FIXED CODE ###

def is_prime(n):
    if n == 1:
        return False
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            return False
    return True

if __name__ == '__main__':
    n = int(input())
    while not is_prime(n):
        n += 1
    print(n)
import numoy as np
N,M = list(map(int,input().split()))
A = input().split()

count = 0
A = np.array(A,dtype='int64')
B = np.cumsum(A)
C = np.append([0],B)

L = (1 for i in range(N+1) for t in range(N+1))
print(len(list(L)))

### FIXED CODE ###

import collections
import numpy as np

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

A = np.array(A,dtype='int64')
C = np.append([0],np.cumsum(A))
L = [i%M for i in C]
L_c = collections.Counter(L)

ans = 0
for i in L_c.values():
    S = i * (i-1) / 2
    ans+=S
    
print(int(ans))