Harryxun/stf_run huggingface dataset:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

S = int(input())

diff = 9999
for i in range(N-2):
    s = int(S[i:i+3])
    if abs(s - 753) < diff:
        diff = s - 753
print(diff)


### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

S = input()

diff = 9999
for i in range(len(S)-2):
    s = int(S[i:i+3])
    if abs(s - 753) < diff:
        diff = abs(s - 753)
print(diff)
print(int(r*r))

### FIXED CODE ###

r=int(input()) 
print(r*r)
import bisect

N,M=map(int,input().split())
A=list(map(int,input().split()))
BC=[list(map(int,input().split())) for i in range(M)]

A.sort()
BC.sort(key=lambda x: x[1],reverse=True) 
ans=0
for j in range(M):
    if A[0]>=BC[j][1] or len(A)==0:
        break
    else:
        b=BC[j][0]
        c=BC[j][1]
        R=bisect.bisect_left(A,c)
        if R>=b:
            A[0:b]=[]
            ans+=b*c
        else:
            A[0:R]=[]
            ans+=R*c
print(sum(A)+ans)

### FIXED CODE ###

import bisect

N,M=map(int,input().split())
A=list(map(int,input().split()))
BC=[list(map(int,input().split())) for i in range(M)]

A.sort()
BC.sort(key=lambda x: x[1],reverse=True) 
ans=0
for j in range(M):
    if A[0]>=BC[j][1]:
        break
    else:
        b=BC[j][0]
        c=BC[j][1]
        R=bisect.bisect_left(A,c)
        n=len(A)
        if R>b:
            if n<=b:
                A=[]
                ans+=n*c
                break
            else:
                del A[0:b]
                ans+=b*c
        else:
            del A[0:R]
            ans+=R*c
    if len(A)==0:
        break        
print(sum(A)+ans)
import math
n,X = map(int, input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
Y = []
for i in range(n):
  Y.append(x[i+1]-x[i])

ans = Y[0]
for y in Y:
  ans = math.gcd(ans,y)
print(ans)

### FIXED CODE ###

n,X = map(int, input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
Y = []
for i in range(n):
  Y.append(x[i+1]-x[i])

def gcd(a,b):
    if b == 0:
        return a
    return gcd(b, a % b)

ans = Y[0]
for y in Y:
  ans = gcd(ans,y)
print(ans)
def insertionSort( nums, n, g ):
	global cnt
	for i in range( g, n):
		v = nums[i]
		j = i - g
		while ( 0 <= j ) and ( v < nums[j] ):
			nums[ j+g ] = nums[j]
			j -= g
			cnt += 1
		nums[ j+g ] = v
		
def shellSort( nums, n ):
	global cnt
	cnt = 0
	g = []
	v = 1
	while v <= n:
		g.append( v )
		v = 3*v+1     
	g.reverse( )
	m = len( g )
	print( m )
	print( " ".join( map( str, g ) ) )	
	for i in range( m ):
		insertionSort( nums, n, g[i] )
	print( cnt )
 

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

shellSort( nums, n )
for v in nums:
	print( v )

### FIXED CODE ###

import sys
 
def insertionSort( nums, n, g ):
    cnt = 0
    i = g
    while i < n:
        v = nums[i]
        j = i - g
        while 0 <= j and v < nums[j]:
            nums[ j+g ] = nums[j]
            j -= g
            cnt += 1
        nums[ j+g ] = v
        i += 1
    return cnt
         
def shellSort( nums, n ):
    g = []
    val = 1
    while val <= n:
        g.append( val )
        val = 3*val+1
     
    g.reverse( )
    m = len( g )
    print( m )
    print( " ".join( map( str, g ) ) )
    cnt = 0
    for i in range( m ):
        cnt += insertionSort( nums, n, g[i] )
    print( cnt )
     
n = int( sys.stdin.readline( ) )
nums = []
for i in range( n ):
    nums.append( int( sys.stdin.readline( ) ) )
 
shellSort( nums, n )
print( "\n".join( map( str, nums ) ) )
import math
a,b,x = map(int,input().split())
ans = 0
if (a*a*b)/2>=x :
    t = x*2/b/a/b
    ans = 90-math.degrees(math.atan(t))
else if (a*a*b)==x:
    ans = 0.0
else :
    x = (a*a*b) - x
    t = x*2/a/a
    ans = 90-math.degrees(math.atan(a/t))
print(ans)

### FIXED CODE ###

import math
a,b,x = map(int,input().split())
ans = 0
if (a*a*b)/2>=x :
    t = x*2/b/a/b
    ans = 90-math.degrees(math.atan(t))
elif (a*a*b)==x:
    ans = 0.0
else :
    x = (a*a*b) - x
    t = x*2/a/a
    ans = 90-math.degrees(math.atan(a/t))
print(ans)
n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))
p = {}
for j in d:
    if j not in p:
        p[j] = 1
    else:
        p[j] += 1
for i in t:
    if p[i] == 0 or i not in p:
        print("NO")
        exit()
    p[i] -= 1
print("YES")

### FIXED CODE ###

n = int(input())
D = list(map(int,input().split()))
m = int(input())
T = list(map(int,input().split()))

p = {}
for d in D:
    if d not in p:
        p[d] = 1
    else:
        p[d] += 1

for t in T:
    if t not in p:
        print('NO')
        exit()
    if p[t] == 0:
        print('NO')
        exit()
    p[t] -= 1
    
print('YES')
from collections import Counter
import sys
sys.setrecursionlimit(200000)


def read():
    N, M, Q = map(int, input().split())
    ABCD = []
    for i in range(Q):
        a, b, c, d = map(int, input().split())
        ABCD.append((a, b, c, d))
    return N, M, Q, ABCD


def check(N, M, Q, ABCD, x):
    score = 0
    for a, b, c, d in ABCD:
        if x[b-1] - x[a-1] == c:
            score += d
    return score


def solve(N, M, Q, ABCD):
    smax = 0
    for a in range(M+1):
        for b in range(a, M+1):
            for c in range(b, M+1):
                for d in range(c, M+1):
                    for e in range(d, M+1):
                        for f in range(e, M+1):
                            for g in range(f, M+1):
                                for h in range(g, M+1):
                                    for i in range(h, M+1):
                                        for j in range(i, M+1):
                                            s = check(N, M, Q, ABCD, [a, b, c, d, e, f, g, h, i, j][:M])
                                            smax = max(s, smax)
    return smax


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("{}".format(outputs))


### FIXED CODE ###

from collections import Counter
import sys
sys.setrecursionlimit(200000)


def read():
    N, M, Q = map(int, input().split())
    ABCD = []
    for i in range(Q):
        a, b, c, d = map(int, input().split())
        ABCD.append((a, b, c, d))
    return N, M, Q, ABCD


def check(N, M, Q, ABCD, x):
    score = 0
    for a, b, c, d in ABCD:
        if x[b-1] - x[a-1] == c:
            score += d
    return score


def solve(N, M, Q, ABCD):
    smax = 0
    for a in range(1, M+1):
        for b in range(a, M+1):
            for c in range(b, M+1):
                for d in range(c, M+1):
                    for e in range(d, M+1):
                        for f in range(e, M+1):
                            for g in range(f, M+1):
                                for h in range(g, M+1):
                                    for i in range(h, M+1):
                                        for j in range(i, M+1):
                                            s = check(N, M, Q, ABCD, [a, b, c, d, e, f, g, h, i, j][:N])
                                            smax = max(s, smax)
    return smax


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("{}".format(outputs))
n = input().split()
x = n[0]
y = n[1]
if x == y:
    print(x * y + " " + x * 4)
else
    print(x * y + " " + (x + y) * 2)

### FIXED CODE ###

x,y = map(int, input().split())
print(x * y, (x + y) * 2)
def binary_search(list_a,item):
  low=0
  high=len(list_a)-1
  while low<=high:
    mid=int((low+high)/2)
    guss=list_a[mid]
    if guss>item:
      high=mid-1
    elif guss<item:
      low=mid+1
    elif guss==item:
      return mid
  return mid

def main():
  N=int(input())
  A=sorted(list(map(int,input().split())))
  B=sorted(list(map(int,input().split())))
  C=sorted(list(map(int,input().split())))
  ans=0    
  for b in B:
    p=binary_search(A,b)
    if A[p]>b:
      tmp_p=p
    elif A[p]<b:
      tmp_p=p+1
    elif A[p]==b:
      while A[p]==A[p-1]:
        p-=1
      tmp_p=p
    q=binary_search(C,b)
    if C[q]>b:
      tmp_q=N-q
    elif C[q]<b:
      tmp_q=N-q-1
    elif C[q]==b:
      while C[q]==C[q+1]:
        q+=1
      tmp_q=N-q-1
    ans+=tmp_p*tmp_q
  print(ans)
  
if __name__=="__main__":
  main()

### FIXED CODE ###

import bisect

def main():
  N=int(input())
  A=sorted(list(map(int,input().split())))
  B=sorted(list(map(int,input().split())))
  C=sorted(list(map(int,input().split())))
  ans=0
  for b in B:
    a=bisect.bisect_left(A,b)
    c=N-bisect.bisect_right(C,b)
    ans+=a*c
  print(ans)
  
if __name__=="__main__":
  main()
a,b,c,d = list(map(int, input().split()))

if a > 0 and b > 0 and c > 0 and d > 0:
  ans = b * d
elif a < 0 and c > 0 and d > 0:
  ans = b * d
elif a < 0 and b < 0 and c > 0 and d > 0:
  ans = b * c
elif a > 0 and b > 0 and c < 0 and d < 0:
  ans = a * d
elif a > 0 and b > 0 and c < 0 and d > 0:
  ans = b * d
elif a < 0 and c < 0:
  ans = a * c

print(ans)

### FIXED CODE ###

a,b,c,d = list(map(int, input().split()))

l = [a*d,a*c,b*c,b*d]
print(max(l))
def main():
	n=int(input())
	a=list(map(int, input().split()))
	count = 0
	while count==0:
		for i in range(n):
			if  a.count(a[i])> 1:
				count+=1
				print('NO')
				break
			else:
				continue
	if count==0:
		print('YES')
main()

### FIXED CODE ###

def main():
	s,t = map(str,input().split())
	a, b = map(int, input().split())
	u= input()
	if u==s:
		print(str(a-1),str(b))
	else:
		print(str(a),str(b-1))
main()
N, K = map(int, input().split())
 
tmp = set()
 
for i in range(N):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))

### FIXED CODE ###

N, K = map(int, input().split())
 
tmp = set()
 
for i in range(K):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))
# -*- coding: utf-8 -*-
#from fractions import gcd
from math import gcd

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

if N == 2:
    print(max(A))
else:
    ans = gcd(A[0], A[1])
    ans2 = max(gcd(A[0], A[2]), gcd(A[1], A[2]))
    for a in A[2:]:
        ans2 = max(gcd(a, ans2), ans)
        ans = gcd(a, ans)
    
    print(ans2)
    

### FIXED CODE ###

# -*- coding: utf-8 -*-
from fractions import gcd

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

if N == 2:
    print(max(A))
else:
    ans = gcd(A[0], A[1])
    ans2 = max(gcd(A[0], A[2]), gcd(A[1], A[2]))
    for a in A[2:]:
        ans2 = max(gcd(a, ans2), ans)
        ans = gcd(a, ans)
    
    print(ans2)
n=input()
print("Yes" if int(n)%sum(map(int,lsit(n)))==0 else "No")

### FIXED CODE ###

n=input()
print("Yes" if int(n)%sum(map(int,list(n)))==0 else "No")
import sys
y = sys.stdin.readline()

xx = y.rstrip()

num = 1
n1 = 0
for x in range(xx):
    for y in range(xx-1):
            n1 = (x+1)**(y+2)
            if n1 >= num:
                if n1 <= xx:
                    num = n1
print(num)

### FIXED CODE ###

import sys
X = sys.stdin.readline() 
x = int(X)
n = 1
m = 1
ans = 1
for i in range(9):
    n=1
    b = i+2
    a = 1
    while n <= x:
        a+=1
        n = a**b
        if n<=x and n>=ans:
            ans = n
print(ans)
N = int(input())
A = list(map(int, input().split()))

A.sort()
L = []
pre_val = A[0]
count = 0
for a in A:
    if pre_val == a:
        count += 1
    else:
        temp = [pre_val, count]
        L.append(temp)
        count = 1
        pre_val = a
L.append([pre_val, count])

res = 0
for i in range(len(L)):
    flag = False
    if L[i][1] != 1:
        continue
    Ai = L[i][0]
    for j in range(i):
        Aj = L[j][0]
        if Ai % Aj == 0:
            flag = True
            break
    if flag is False:
        res += 1
print(res)


### FIXED CODE ###

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

min_val = -1
for i in range(-1000, 1000):
    if i in P:
        continue
    if abs(min_val - X) > abs(X - i):
        min_val = i
if len(P) == 0:
    print(X)
else:
    print(min_val)
i = input()
idx = 0

while idx < i:
  	cnt = 0
	for _ in range(3):
      d1, d2 = list(map(int, input.split(' ')))
      if d1 == d2:
        cnt += 1
    if cnt == 3:
      return 'Yes'
    else:
      idx += 3

print('No')

### FIXED CODE ###

N = int(input())
lst = []
for _ in range(N):
  d1, d2 = map(int, input().split(' '))
  lst.append((d1, d2))
  
idx = 0
flag = False
while idx < N-2:
  cnt = 0
  for i in range(3):
    d1, d2 = lst[i+idx]
    if d1 == d2:
      cnt += 1
  if cnt == 3:
    flag = True
    break
  else:
    idx += 1
 
print('Yes' if flag else 'No')
import sys
import numpy as np

def main(inp):
    N,M=map(int,next(inp).split())
    X=np.array(list(map(int,next(inp).split())))
    X=np.sort(X)
    
#     print(N,M,X)
    
    delta=np.empty([M-1],dtype=int)
    
    for i in range(M-1):
        delta[i]=X[i+1]-X[i]
    
#     print(X)
#     print(delta)
    
    
    #delta=np.split(delta,[1,2])
    #print(delta)
    
    splpoint=np.argpartition(np.array(delta),-N+1)[-N+1:]
    splpoint=np.sort(splpoint)
    for i in range(len(splpoint)):
        splpoint[i]+=1
    
#     delta=np.delete(delta,splpoint)
#     print(delta)    
#     print(splpoint)
    
    spl=np.split(X,splpoint)
#     print(spl)
    
    ans=0
    for i in range(len(spl)):
        ans+=spl[i][len(spl[i])-1]-spl[i][0]
        
    return ans
  
print(main(sys.stdin))

### FIXED CODE ###

import sys
import numpy as np

def main(inp):
    N,M=map(int,next(inp).split())
    X=np.array(list(map(int,next(inp).split())))
    X=np.sort(X)
        
#     N=inp[0]
#     M=inp[1]    
#     X=np.array(inp[2])
    X=np.sort(X)    
#    print("N",N)
#    print("M",M)
#    print("X",X)
    
    if(N>M): return 0
    if(N==1):
        ans=X[len(X)-1]-X[0]
        return ans
    
    delta=np.empty([M-1],dtype=int)
    
    for i in range(M-1):
        delta[i]=X[i+1]-X[i]
    
#    print(X)
#    print("delta",delta)
    
    
    #delta=np.split(delta,[1,2])
    #print(delta)
    
    splpoint=np.argpartition(np.array(delta),-N+1)[-N+1:]
#     splpoint=np.sort(splpoint)
    
    delta=np.delete(delta,splpoint)
#    print(splpoint)
#    print(delta)    
    
    ans=sum(delta)
        
    return ans

print(main(sys.stdin))
A = int(input())
B = int(input())
count = 0
for i in range(A, B+1):
    count += (str(i) == str(i)[::-1])
print(count)

### FIXED CODE ###

A,B=map(int,input().split())
count = 0
for i in range(A, B+1):
    count += (str(i) == str(i)[::-1])
print(count)
N = int(input())
fq = [0] * (N + 10)
A = list(map(int, input().split()))
for a in A:
    fq[a] += 1
fq = [f if f % 1 == 0 else 1 for f in fq]
cnt_even = 0
cnt_odd = 0
for f in fq:
    if f & 1 == 0 and f != 0:
        cnt_even += 1
    if f & 1 == 1:
        cnt_odd += 1
if cnt_even & 1 == 0:
    print(cnt_even + cnt_odd)
else:
    print(cnt_even - 1 + cnt_odd)

### FIXED CODE ###

N = int(input())
fq = [0] * int(10**5 + 10)
A = list(map(int, input().split()))
for a in A:
    fq[a] += 1
fq = [f if f % 1 == 0 else 1 for f in fq]
cnt_even = 0
cnt_odd = 0
for f in fq:
    if f & 1 == 0 and f != 0:
        cnt_even += 1
    if f & 1 == 1:
        cnt_odd += 1
if cnt_even & 1 == 0:
    print(cnt_even + cnt_odd)
else:
    print(cnt_even - 1 + cnt_odd)
def pri(n):
    s=[True for _ in range(n+1)]
    i=2
    while i**2<=n:
        if s[i]:
            j=i*2
            while j<=n:
                s[j]=False
                j+=i
        i+=1

    tab=[i for i in range(n+1) if s[i] and i>=2]
    return(tab)

while True:
    try;
        print(len(pri(int(input()))))
    except
        break

### FIXED CODE ###

def pri(s,n): 
    tab=[i for i in range(n+1) if s[i] and i>=2]
    return(tab)
 
s=[True for _ in range(999999+1)]
i=2
while i**2<=999999:
    if s[i]:
        j=i*2
        while j<=999999:
            s[j]=False
            j+=i
    i+=1

while True:
    try:
        print(len(pri(s,int(input()))))
    except:
        break
# -*- coding: utf-8 -*-
# 文字列の入力
import math

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

def comb1(n, r):
    if n == 0 or r == 0: return 1
    return (comb1(n, r-1) * (n-r+1) / r )%1000000007

ans = (comb(k, n))%1000000007
print(ans)


### FIXED CODE ###


# -*- coding: utf-8 -*-
# 文字列の入力
import math

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

def comb(n,k,p):
  """power_funcを用いて(nCk) mod p を求める"""
  from math import factorial
  if n<0 or k<0 or n<k: return 0
  if n==0 or k==0: return 1
  a=factorial(n) %p
  b=factorial(k) %p
  c=factorial(n-k) %p
  return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p
def power_func(a,b,p):
  """a^b mod p を求める"""
  if b==0: return 1
  if b%2==0:
    d=power_func(a,b//2,p)
    return d*d %p
  if b%2==1:
    return (a*power_func(a,b-1,p ))%p
    
ans = comb(k, n,1000000007)
print(int(ans))
n, l = map(int, input().split)
if n = l:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n, l = map(int, input().split())
if n == l:
  print("Yes")
else:
  print("No")
import numpy as np
N,M,C = map(int,input().split())
B = [int(k) for k in input().split()]
A = [[int(j) for j in input().split()] for i in range(1,N+1)] 
b = np.array(B)
cnt = 0
for i in range(1,N+1):
    if (np.dot(np.array(A[i]),b) + C >0):
        cnt += 1
    else:
        cnt = cnt
        
print(cnt)




### FIXED CODE ###

import numpy as np
N,M,C = map(int,input().split())
B = [int(k) for k in input().split()]
A = [[int(j) for j in input().split()] for i in range(N)] 
b = np.array(B)
cnt = 0
for i in range(N):
    if (np.dot(np.array(A[i]),b) + C >0):
        cnt += 1
    else:
        cnt = cnt
        
print(cnt)
#include <math.h>

#include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>

using namespace std;

int main() {
  int N;
  cin >> N;
  vector<double> V(N);
  for (size_t i = 0; i < N; i++) {
    cin >> V[i];
  }

  while (V.size() != 1) {
    sort(V.rbegin(), V.rend());
    int a = V.back();
    V.pop_back();
    int b = V.back();
    V.pop_back();
    V.push_back((double)(a + b) / (double)2.0);
  }

  printf("%lf\n", V[0]);

  return 0;
}


### FIXED CODE ###

#coding: utf-8

N = int(input())
V = [int(v) for v in input().split()]

for i in range(N-1):
    V.sort()
    V.append((V[0]+V[1])/2)
    V = V[2:]

print (V[0])
def main()->None:
    W, H, N = map(int, input().split())
    range_N = range(N)
    xl, xr, yd, yu = 0, w, 0, h
    for i in range_N:
        x, y, a = map(int, input().split())
        if a == 1:
            xl = max(x, xl)
        if a == 2:
            xr = min(x, xr)
        if a == 3:
            yd = max(y, yd)
        else:
            yu = min(y, yu)
    if xl >= xr or yd >= yu:
        print(0)
    else:
        print((xr - xl) * (yu - yd))

if __name__ == "__main__":
    main()

### FIXED CODE ###




def main()->None:
    W, H, N = map(int, input().split())
    range_N = range(N)
    xl, xr, yd, yu = 0, W, 0, H
    for i in range_N:
        x, y, a = map(int, input().split())
        if a == 1:
            xl = max(x, xl)
        elif a == 2:
            xr = min(x, xr)
        elif a == 3:
            yd = max(y, yd)
        else:
            yu = min(y, yu)
    if xl >= xr or yd >= yu:
        print(0)
    else:
        print((xr - xl) * (yu - yd))

if __name__ == "__main__":
    main()
X, Y = map(int, input().split())
print("Yes" if 2*Y <= X <= 4*Y and Y%2 == 0 else "No")

### FIXED CODE ###

x_list = list(map(int, input().split()))
for i, num in enumerate(x_list):
    if num == 0:
        print(i+1)
        break
N,Q=map(int,input().split())
S=input()
listS=list(S)
ans=0
listAC=[ans]
for k in range(1,N+1):
  if listS[k-1]=="A" and listS[k]=="C":
    ans+=1
  listAC+=[ans]  
for i in range(Q):
  l,r=map(int,input().split())
  ans=listAC[r-1]-listAC[l-1] 
  print(ans)    

### FIXED CODE ###

N,Q=map(int,input().split())
S=input()
listS=list(S)
ans=0
listAC=[ans]
for k in range(1,N):
  if listS[k-1]=="A" and listS[k]=="C":
    ans+=1
  listAC+=[ans]  
for i in range(Q):
  l,r=map(int,input().split())
  ans=listAC[r-1]-listAC[l-1] 
  print(ans)
n = int(input())
s = input()
k = int(input())

x = s[k]
temp_list = []

for c in s:
  if c is not x:
    temp_list.append('*')
  else:
    temp_list.append(c)

print(''.join(temp_list))

### FIXED CODE ###

n = int(input())
s = input()
k = int(input())

x = s[k-1]
temp_list = []

for c in s:
  if c is not x:
    temp_list.append('*')
  else:
    temp_list.append(c)

print(''.join(temp_list))
def solve(N, T, A, ls_H):
    dosi = []
    titen = []
    titen1 = []
    ti = 100000 * 1000
    for x in ls_H :
        do = 1000 * T - x * 6
        dosi.append(do)
    #print(dosi)
    
    for y in dosi :
        ti = 1000 * A - y
        titen.append(ti)
    #print(titen)
    
    for z in titen :
        titen1.append(abs(z))
    #print(titen1)
    
    for i in titen1 :
        if ti > i :
            ti = i
    #print(ti)
    return titen1.index(ti) + 1
 
 
def readQuestion():
    ws = sys.stdin.readline().strip().split()
    N = int(ws[0])
    ws = sys.stdin.readline().strip().split()
    T = int(ws[0])
    A = int(ws[1])
    ws = sys.stdin.readline().strip().split()
    ls_H = list(map(int, ws))
    return (N, T, A, ls_H)
 
def main():
    print(solve(*readQuestion()))
 
# Uncomment before submission
main()


### FIXED CODE ###

import sys
 
def solve(N, T, A, ls_H):
    return min([(abs(A - (T - h * 0.006)), i) for (i, h) in enumerate(ls_H, start=1)])[1]
 
def readQuestion():
    ws = sys.stdin.readline().strip().split()
    N = int(ws[0])
    ws = sys.stdin.readline().strip().split()
    T = int(ws[0])
    A = int(ws[1])
    ws = sys.stdin.readline().strip().split()
    ls_H = list(map(int, ws))
    return (N, T, A, ls_H)
 
def main():
    print(solve(*readQuestion()))
 
# Uncomment before submission
main()
import collections
import fractions

n = int(input())
mod = 10 ** 6 + 7
c = []
d = []

frac = {}

for _ in range(n):
    a, b = map(int, input().split())
    try:
        if b == 0: frac[float('inf')] += 1
        else: frac[fractions.Fraction(a, b)] += 1
    except KeyError:
        if b == 0: frac[float('inf')] = 1
        else: frac[fractions.Fraction(a, b)] = 1

for key, value in frac.items():
    if -1 <= key < 1: continue
    try:
        if key == 0:
            d.append(frac[float('inf')])
        elif key == float('inf'):
            d.append(fractions.Fraction())
        else:
            d.append(frac[-1 / key])
        c.append(value)
    except KeyError:
        continue

ans = pow(2, n - sum(c) - sum(d), mod)
for i, j in zip(c, d):
    tmp = (pow(2, i, mod) + pow(2, j, mod) - 1)
    ans = (ans * (pow(2, i, mod) + pow(2, j, mod) - 1)) % mod
ans -= 1

print(ans)

### FIXED CODE ###

import collections
import math

n = int(input())
m = 0
mod = 10 ** 9 + 7
c = []
d = []
frac = []

for _ in range(n):
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        n -= 1
        m += 1
        continue
    if a == 0:
        frac.append('0/1')
    elif b == 0:
        frac.append(('1/0'))
    else:
        gcd = abs(math.gcd(a, b))
        sign = 1 if a * b > 0 else -1
        a = sign * abs(a) // gcd
        b = abs(b) // gcd
        frac.append('{}/{}'.format(a, b))

frac = collections.Counter(frac)

def inverse(key):
    if key == '0/1':
        return '1/0'
    elif key == '1/0':
        return '0/1'
    elif key[0] != '-':
        a, b = key.split('/')
        return '-{}/{}'.format(b, a)
    else:
        a, b = key[1:].split('/')
        return '{}/{}'.format(b, a)

for key, value in frac.items():
    if key[0] == '-' or key[0] == '0': continue
    if frac[inverse(key)] > 0:
        c.append(value)
        d.append(frac[inverse(key)])

ans = pow(2, n - sum(c) - sum(d), mod)
for i, j in zip(c, d):
    tmp = (pow(2, i, mod) + pow(2, j, mod) - 1) % mod
    ans = ans * tmp % mod
ans = (ans - 1 + m) % mod

print(ans)
e=[input()for _ in[0]*int(input())]
for s in"SHCD":
 for r in range(1,14):
  if f'{s} {i}'not in e:print(s,r)


### FIXED CODE ###

n=int(input())
e=[input()for _ in[0]*n]
for s in"SHCD":
 for r in range(1,14):
  if f'{s} {r}'not in e:print(s,r)