Harryxun/stf_run huggingface dataset:
import collections
def solve():
  n = int(input())
  queue = []
  queue2 = []
  for i in range(n):
   x,y = (int(i) for i in input().split())
   queue.append((x,y))
  for i in range(n):
    for j in range(n):
      if i!=j:
        x1,y1 = queue[i]
        x2,y2 = queue[j]
        p = x2-x1
        q = y2-y1
        queue2.append((p,q))
  #print(queue2)
  c = collections.Counter(queue2)
  ans = n
  
  print(ans-c.most_common()[0][1])
solve()


### FIXED CODE ###

import collections
def solve():
  n = int(input())
  queue = []
  queue2 = []
  if n == 1:
    print(1)
    exit()
  for i in range(n):
   x,y = (int(i) for i in input().split())
   queue.append((x,y))
  for i in range(n):
    for j in range(n):
      if i!=j:
        x1,y1 = queue[i]
        x2,y2 = queue[j]
        p = x2-x1
        q = y2-y1
        queue2.append((p,q))
  #print(queue2)
  
  c = collections.Counter(queue2)
  ans = n
  print(ans-c.most_common()[0][1])
solve()
N,A = list(map(int,input().split(" ")))
nums = list(map(int,input().split(" ")))

dp = [[[0 for i in range(2800)]for j in range(50)]for k in range(50)]

# dp[i][j][k] → i枚のうちj枚を選んで 和が kになる組み合わせ
dp[0][0][0] = 1
for i in range(N):
    for j in range(N):
        for k in range(2501):
            if dp[i][j][k] != 0:
                dp[i+1][j][k] += dp[i][j][k]    #i枚目を選ばなかった世界線
                dp[i + 1][j + 1][k + nums[i]]  += dp[i][j][k]          #i枚目を選んだ世界線


ans = 0
for j in range(1,N+1):
    ans += dp[N][j][j*A]
print(ans)

### FIXED CODE ###


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

dp = [[[0 for i in range(4000)]for j in range(51)]for k in range(51)]

# dp[i][j][k] → i枚のうちj枚を選んで 和が kになる組み合わせ
dp[0][0][0] = 1
for i in range(N):
    for j in range(N):
        for k in range(3000):
            if dp[i][j][k] != 0:
                dp[i+1][j][k] += dp[i][j][k]    #i枚目を選ばなかった世界線
                dp[i + 1][j + 1][k + nums[i]]  += dp[i][j][k]          #i枚目を選んだ世界線


ans = 0
for j in range(1,N+1):
    ans += dp[N][j][j*A]
print(ans)
a=int(input())
b=int(input())
print(2b-a)

### FIXED CODE ###

a=int(input())
b=int(input())
print(2*b-a)
N,M = map(int,input().split())
list = [int(i) for i input().split()]

total = 0
for i in range(N):
    if i >= sum(list) / (4 * M):
        total = total + 1

if total >= M:
    print("Yes")
else:
    print('No')

### FIXED CODE ###

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

total = 0
for i in A:
    if i >= (sum(A) / (4 * M)):
        total = total + 1

if total >= M:
    print("Yes")
else:
    print('No')
N=int(input())
city=[0]*N
for i in range(N):
    x,y=map(int,input().split())
    city[i]=(i,x,y)
city.sort(key=lambda x:x[1])
data=[(city[i][0],city[i+1][0],city[i+1][1]-city[i][1]) for i in range(N-1)]
city.sort(key=lambda x:x[2])
data+=[(city[i][0],city[i+1][0],city[i+1][2]-city[i][2]) for i in range(N-1)]
data.sort(key=lambda x:x[2])
f = list(range(N))
costs = [0] * N
def find(x):
    if f[x] != x:
        f[x] = find(f[x])
    return f[x]
res = 0
for i, j, k in data:
    fi, fj = find(i), find(j)
    if fi == fj:
        continue
    else:
        f[fi] = fj
        res += k
print(res)

### FIXED CODE ###

N=int(input())
city=[0]*N
for i in range(N):
    x,y=map(int,input().split())
    city[i]=(i,x,y)
city.sort(key=lambda x:x[1])
data=[(city[i][0],city[i+1][0],city[i+1][1]-city[i][1]) for i in range(N-1)]
city.sort(key=lambda x:x[2])
data+=[(city[i][0],city[i+1][0],city[i+1][2]-city[i][2]) for i in range(N-1)]
data.sort(key=lambda x:x[2])
f = list(range(N))
costs = [1] * N
def find(x):
    if f[x] != x:
        f[x] = find(f[x])
    return f[x]
res = 0
for i, j, k in data:
    fi, fj = find(i), find(j)
    if fi == fj:
        continue
    else:
        if costs[fi] <= costs[fj]:
            f[fi] = fj
            costs[fj] += costs[fi]
            res += k
        else:
            f[fj] = fi
            costs[fi] += costs[fj]
            res += k
print(res)
X,N = map(int,input().split(" "))
if N != 0:
    p_list = list(map(int,input().split(" ")))
target = X
target_num_min = X
target_num_plus = X
if X in p_list:
    while True:
        target_num_min -= 1
        if target_num_min not in p_list:
            target = target_num_min
            break
        target_num_plus += 1
        if target_num_plus not in p_list:
            target = target_num_plus
            break
print(target)

### FIXED CODE ###

X,N = map(int,input().split(" "))
target = X
if N != 0:
    p_list = list(map(int,input().split(" ")))

    target_num_min = X
    target_num_plus = X
    if X in p_list:
        while True:
            target_num_min -= 1
            if target_num_min not in p_list:
                target = target_num_min
                break
            target_num_plus += 1
            if target_num_plus not in p_list:
                target = target_num_plus
                break
print(target)
n = int(input())
a= [int(i) for i in input().split()]

for i in range(len(a)):
    a[i]-=i+1

aa=sorted(a)
if n%2==0:
  b=(aa[n/2-1]+aa[n/2])/2
else:
  b=aa[int((n-1)/2)]

s=0
for i in aa:
  s+=abs(i-b)
print(s)



### FIXED CODE ###

n = int(input())
a= [int(i) for i in input().split()]

for i in range(len(a)):
    a[i]-=i+1

aa=sorted(a)
if n%2==0:
  b=(aa[int(n/2-1)]+aa[int(n/2)])/2
else:
  b=aa[int((n-1)/2)]

s=0
for i in aa:
  s+=abs(i-b)
print(int(s))
def left(arr, idx):
    if L[idx] != None:
        return L[idx]
    if idx == -1:
        ret =  0
    else:
        if arr[idx] == '<':
            ret = left(arr, idx-1) + 1
        else:
            ret = 0
    L[idx] = ret
    return ret
        
def right(arr, idx):
    if R[idx] != None:
        return R[idx]
    if idx == len(arr):
        ret =  0 
    else:
        if arr[idx] == '>':
            ret = right(arr, idx+1) + 1
        else:
            ret = 0
    R[idx] = ret
    return ret

def main():
    S = list(input())
    N = len(S)
    A = [0 for _ in range(N+1)]
    
    global L; L = [None for _ in range(N+1)]
    global R; R = [None for _ in range(N+1)]

    for i in range(len(A)):
        A[i] = max(left(S, i-1), right(S, i))
            
    print(sum(A))

if __name__ == "__main__":
    main()


### FIXED CODE ###

def left(arr, idx):
    if L[idx] != None:
        return L[idx]

    if arr[idx] == '<':
        if idx == 0:
            ret = 1
        else:
            ret = left(arr, idx-1) + 1
    else:
        ret = 0

    L[idx] = ret
    return ret
        
def right(arr, idx):
    if R[idx] != None:
        return R[idx]

    if arr[idx] == '>':    
        if idx == len(arr)-1:
            ret =  1
        else:
            ret = right(arr, idx+1) + 1
    else:
        ret = 0
    R[idx] = ret
    return ret

def main():
    S = list(input())
    N = len(S)
    A = [0 for _ in range(N+1)]
    
    global L; L = [None for _ in range(N)]
    global R; R = [None for _ in range(N)]

    for i in range(N):
        j = N - i - 1
        L[i] = left(S, i)
        R[j] = right(S, j)
    
    L = [0] + L
    R = R + [0]

    for i in range(len(A)):
        A[i] = max(L[i], R[i])
            
    print(sum(A))

if __name__ == "__main__":
    main()
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True, end="")

sx,sy,tx,ty=LI()

for i in range(abs(ty-sy)):
	pf("U")

for i in range(abs(sx-tx)):
	pf("R")

for i in range(abs(ty-sy)):
	pf("D")
	
for i in range(abs(sx-tx)):
	pf("L")

pf("L")

for i in range(abs(ty-sy)):
	pf("U")
pf("U")
pf("R")

for i in range(abs(sx-tx)):
	pf("R")
	
pf("D")

pf("R")

for i in range(abs(ty-sy)):
	pf("D")
pf("D")
pf("L")
for i in range(abs(tx-sx)):
	pf("L")
pf("U")

### FIXED CODE ###

import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True, end="")

sx,sy,tx,ty=LI()

for i in range(abs(ty-sy)):
	pf("U")

for i in range(abs(sx-tx)):
	pf("R")

for i in range(abs(ty-sy)):
	pf("D")
	
for i in range(abs(sx-tx)):
	pf("L")

pf("L")

for i in range(abs(ty-sy)):
	pf("U")
pf("U")
pf("R")

for i in range(abs(sx-tx)):
	pf("R")
	
pf("D")

pf("R")

for i in range(abs(ty-sy)):
	pf("D")
pf("D")
pf("L")
for i in range(abs(tx-sx)):
	pf("L")
pf("U")
n = int(input())
for i in range(n):
    F = set(map(int, input().split()))
    fl = min(F); fr = max(F)
    G = {*range(1, 14)} - F - {7}
    gl = min(G); gr = max(G)

    memo = {}
    def dfs(s, t, u):
        if (s, t, u) in memo:
            return memo[s, t, u]
        T = [G, F][u]
        res = 0
        if s-1 in T:
            if s-1 <= [gl, fl][u] and [gr, fr][u] <= t:
                res = 1
            else:
                res |= dfs(s-1, t, u^1)^1

        if t+1 in T:
            if s <= [gl, fl][u] and [gr, fr][u] <= t+1:
                res = 1
            else:
                res |= dfs(s, t+1, u^1)^1

        if s-1 not in T and t+1 not in T:
            res = dfs(s, t, u^1)^1
        memo[s, t, u] = res
        return res
    print(["no", "yes"][dfs(7, 7, 1)])

### FIXED CODE ###

n = int(input())
for i in range(n):
    F = set(map(int, input().split()))
    fl = min(F); fr = max(F)
    G = {i for i in range(1, 14)} - F - {7}
    gl = min(G); gr = max(G)

    memo = {}
    def dfs(s, t, u):
        if (s, t, u) in memo:
            return memo[s, t, u]
        T = [G, F][u]
        res = 0
        if s-1 in T:
            if s-1 <= [gl, fl][u] and [gr, fr][u] <= t:
                res = 1
            else:
                res |= dfs(s-1, t, u^1)^1

        if t+1 in T:
            if s <= [gl, fl][u] and [gr, fr][u] <= t+1:
                res = 1
            else:
                res |= dfs(s, t+1, u^1)^1

        if s-1 not in T and t+1 not in T:
            res = dfs(s, t, u^1)^1
        memo[s, t, u] = res
        return res
    print(["no", "yes"][dfs(7, 7, 1)])
m = list(map(int,input().split()))
a=[int(input()) for i in range(m[2])]

n = [m[1]] * m[2]
print(n)

for i in range(m[2]):
    n = [i-1 for i in n]
    n[a[i]-1] +=1

for i in range(m[0]):
    if n[i]>0:
        print('Yes')
    else:
        print('No')
    

### FIXED CODE ###

m = list(map(int,input().split()))
n = [0] * m[0]

for i in range(m[2]):
    n[int(input())-1] += 1
  
for i in range(m[0]):
    if n[i] - m[2] + m[1] > 0:
        print('Yes')
    else:
        print('No')
N,M=map(int,input().split())
X=sorted(list(map(int,input().split())))
if N<M:
    D=sorted([X[i+1]-X[i] for i in range(M-1)])
    print(sum(D[i] for i in range(M-N)))
else:
    print(0)

### FIXED CODE ###

T,X=map(int,input().split())
print(T/X)
N,M = map(int,input().split())
L = list(map(int,input().split()))
R = list(map(int,input().split()))
L.sort()
R.sort()
count = 0
for i in range(N):
  if i >= L[0] and i <= R[0]:
    count += 1
print(count)

### FIXED CODE ###

N,M = map(int,input().split())
L = []
R = []
ans = 0
for _ in range(M):
  l, r = map(int, input().split())
  L.append(l)
  R.append(r)
ans = max(0,min(R) - max(L) + 1)
print(ans)
input()
S = input().strip()
type = len(set(list(S)))

def DP(i,s):
  me = 1 if len(s) > 0 else 0
  # 葉
  if len(S) <= i:
    return me
  if len(s) >= type:
    return 1
  
  # S[i]を採用しない
  notadopt = DP(i+1, s)
  
  # S[i]を採用する
  if S[i] not in s:
    s += S[i]
    adopt = DP(i+1, s)
  else:
    adopt = 0

  return adopt + notadopt

print(DP(0, '')%(10**9+7))

### FIXED CODE ###

from collections import Counter
input()
S = input().strip()
c = Counter(S)
ans = 1
for k,v in c.items():
  ans *= (v+1)
print((ans-1)%(10**9+7))
#include <bits/stdc++.h>

using namespace std;

int table[2][200000] = {{}, {}};

int uffind(int i, int x) {
  if (table[i][x] == -1) {
    return x;
  }
  return (table[i][x] = uffind(i, table[i][x]));
}

void ufunion(int i, int x, int y) {
  int s1 = uffind(i, x), s2 = uffind(i, y);
  if (s1 != s2) {
    table[i][s2] = s1;
  }
}

int main() {
  for (int i = 0; i < 200000; i++) {
    table[0][i] = table[1][i] = -1;
  }
  int n, k, l;
  cin >> n >> k >> l;
  for (int i = 0; i < k; i++) {
    int p, q;
    cin >> p >> q;
    p--; q--;
    ufunion(0, p, q);
  }
  for (int i = 0; i < l; i++) {
    int r, s;
    cin >> r >> s;
    r--; s--;
    ufunion(1, r, s);
  }
  map<int, vector<int> > d2;
  map<int, vector<int> > t2;
  for (int i = 0; i < n; i++) {
    int sd = uffind(0, i);
    decltype(d2)::iterator itd = d2.find(sd);
    if (itd == d2.end()) {
      vector<int> vd(1, i);
      d2.insert(make_pair(sd, vd));
    } else {
      itd->second.push_back(i);
    }
    int st = uffind(1, i);
    decltype(t2)::iterator itt = t2.find(st);
    if (itt == t2.end()) {
      vector<int> vt(1, i);
      t2.insert(make_pair(st, vt));
    } else {
      itt->second.push_back(i);
    }
  }
  for (int i = 0; i < n; i++) {
    decltype(d2)::iterator itd = d2.find(uffind(0, i));
    decltype(t2)::iterator itt = t2.find(uffind(1, i));
    vector<int> vd = itd->second;
    vector<int> vt = itt->second;
    vector<int> res(vd.size() + vt.size());
    sort(vd.begin(), vd.end());
    sort(vt.begin(), vt.end());
    vector<int>::iterator it = set_intersection(vd.begin(), vd.end(), vt.begin(), vt.end(), res.begin());
    res.resize(it - res.begin());
    cout << res.size();
    if (i != n - 1) {
      cout << ' ';
    }
  }
  cout << endl;
  return 0;
}


### FIXED CODE ###

#http://www.geocities.jp/m_hiroi/light/pyalgo61.html
class UF(object):
    def __init__(self, n):
        self.table = [None for i in range(n)]
    def find(self, x):
        if self.table[x] is None:
            return x
        else:
            self.table[x] = self.find(self.table[x])
            return self.table[x]
    def union(self, x, y):
        s1 = self.find(x)
        s2 = self.find(y)
        if s1 != s2:
            self.table[s2] = s1

n, k, l = [int(x) for x in raw_input().split()]
d = UF(n)
t = UF(n)
for i in range(k):
    p, q = [int(x) - 1 for x in raw_input().split()]
    d.union(p, q)
for i in range(l):
    r, s = [int(x) - 1 for x in raw_input().split()]
    t.union(r, s)
res = {}
for i in range(n):
    key = (d.find(i), t.find(i))
    res[key] = res.get(key, 0) + 1
for i in range(n):
    print res[(d.find(i), t.find(i))],
N = int(input())
z,w = [],[]
K = 0
for i in range(N):
  x,y = map(int,input().split())
  z.append(x)
  w.append(y)
for j in range(1,N-1):
  if z[j] == w[j] and z[j+1] == w[j+1] and z[j+2] == w[j+2]:
    K += 1

if K >= 1:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N = int(input())
z,w = [],[]
K = 0
for i in range(N):
  x,y = map(int,input().split())
  z.append(x)
  w.append(y)
for j in range(N-2):
  if z[j] == w[j] and z[j+1] == w[j+1] and z[j+2] == w[j+2]:
    K += 1

if K >= 1:
  print("Yes")
else:
  print("No")
N=int(input())
A=list(map(int,input().split()))

d=dict()
sum=0
for i in A:
  if not i in d:
    d[i]=0
  d[i]+=1
  sum+=i
#counterと同じ
for i in range(int(input())):
  b,c=map(int,input().split())
  if not c in d:
    d[c]=0
    
  sum=sum-(d[b]*b)
  sum=sum-(d[c]*c)
  d[c]+=d[b]
  d[b]=0
  sum=sum+(d[c]*c)
  #print(d)
  print(sum)

### FIXED CODE ###

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

d=dict()
sum=0
for i in A:
  if not i in d:
    d[i]=0
  d[i]+=1
  sum+=i
#counterと同じ
for i in range(int(input())):
  b,c=map(int,input().split())
  if not c in d:
    d[c]=0
  if not b in d:
    d[b]=0
    
  sum=sum-(d[b]*b)
  sum=sum-(d[c]*c)
  d[c]+=d[b]
  d[b]=0
  sum=sum+(d[c]*c)
  #print(d)
  print(sum)
n = int(input())
arr = []
for i in range(n-1):
    arr.append([int(s) for s in input().split(" ")])


childNodeNums = [0 for i in range(n)]
childNodeStatus = [-1 for i in range(n)]
nodeLines = [0 for i in range(n - 1)]


def prepare(n, arr):
    s = [[] for i in range(n)]
    for ar in arr:
        s[ar[0] - 1].append(ar[1] - 1)
        s[ar[1] - 1].append(ar[0] - 1)
    return s


# x为记录入边的颜色
def dfs(currentNode, arr, x):
    m1 = childNodeNums
    m2 = childNodeStatus
    childNodes = arr[currentNode]
    if len(childNodes) == 0:
        return

    childNodeNums[currentNode] = childNodeNums[currentNode] + len(arr[currentNode])
    childNodeStatus[currentNode] = 1

    kk = 0
    for i, childNodeIndex in enumerate(childNodes):

        if childNodeStatus[childNodeIndex] == -1:
            kk = kk + 1
            if x == kk:
                kk = kk + 1
            appendIntoNode(currentNode+1,childNodeIndex+1,kk)
            dfs(childNodeIndex, arr, kk)


def appendIntoNode(currentNode,childNode,value):
    for i,v in enumerate(arr):
        if (v[0] == currentNode and v[1] == childNode):
            nodeLines[i] = value


data = prepare(n, arr)
dfs(0, data, -1)

print(max(childNodeNums))

for ar in nodeLines:
    print(ar)


### FIXED CODE ###

from sys import setrecursionlimit


def genid(a, b):
    if b < a:
        a, b = b, a
    return a * 100000 + b


def paint(currentNode, usedColor, parentNode, edges, colors):
    color = 1
    for childNode in edges[currentNode]:
        if childNode == parentNode:
            continue
        if color == usedColor:
            color += 1
        colors[genid(currentNode, childNode)] = color
        paint(childNode, color, currentNode, edges, colors)
        color += 1


setrecursionlimit(100000)

N = int(input())
ab = [list(map(int, input().split())) for _ in range(N - 1)]

edges = [[] for _ in range(N)]
for a, b in ab:
    edges[a - 1].append(b - 1)
    edges[b - 1].append(a - 1)

colors = {}
paint(0, -1, -1, edges, colors)

print(max(len(e) for e in edges))
for a, b in ab:
    print(colors[genid(a - 1, b - 1)])
n=int(input())
A=list(map(int,input().split()))

count=[0 for _ in range(max(A)+1)]
for i in range(n):
  count[A[i]]+=1

  
answer=0
for i in range(0,n-3):
  tmp=int(count[i])+int(count[i+1])+int(count[i+2])
  if tmp>answer:
    answer=tmp
    
print(answer)

### FIXED CODE ###

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

count=[0 for _ in range(max(A)+1)]
for i in range(n):
  count[A[i]]+=1
  
answer=0
if n>3:
  for i in range(0,n-2):
    tmp=sum(count[i:i+3])
    if tmp>answer:
      answer=tmp
elif n==2:
  if len(count)>3:
    answer=1
  else:
    answer=2
elif n==1:
  answer=1

print(answer)
n,x = map(int,input().split())
X = list(map(int,input().split()))
sort_X = sorted(X)
temp = sort_X[0]
mini = float("inf")
D = 1
for xx in sort_X[1:]:
    if(mini >= xx-temp):
        mini = xx-temp
    temp = xx
for p in range(1,mini+1):
    point = x%p
    flag = True
    for xx in X:
        if(point != xx%p):
                flag = False
                break
    if(flag):
        D = p
if(n==1):
    print(999999999)
else:
    print(D)



### FIXED CODE ###

n,x = map(int,input().split())
X = list(map(int,input().split()))
sort_X = sorted(X)
temp = sort_X[0]
mini = float("inf")
D = 1
if(n==1):
    print(abs(X[0]-x))
elif(n==2):
    mini = min(X[-1]-x,x-X[0])

    for p in range(1,mini+1):
        point = x%p
        flag = True
        for xx in X:
            if(point != xx%p):
                    flag = False
                    break
        if(flag):
            D = p
    print(D)

else:
    for xx in sort_X[1:]:
        if(mini >= xx-temp):
            mini = xx-temp
        temp = xx
    for p in range(1,mini+1):
        point = x%p
        flag = True
        for xx in X:
            if(point != xx%p):
                    flag = False
                    break
        if(flag):
            D = p

    print(D)
n = int(input())
l = [input().split() for _ in range(n)]
ot = ox = oy = 0
for (t, x, y) in l:
    diff = int(t) - ot
    if abs(x - ox) + abs(y - oy) <= diff:
        ox = x
        oy = y
        ot = t
    else:
        print("No")
        exit(0)
print("Yes")

### FIXED CODE ###

n = int(input())
l = [input().split() for _ in range(n)]
ot = ox = oy = 0
can = True
for (t, x, y) in l:
    dt = int(t) - ot
    dist = abs(int(x) - ox) + abs(int(y) - oy)
    if dt < dist:
        can = False
    if (dist % 2 != dt % 2):
        can = False
    ox = int(x)
    oy = int(y)
    ot = int(t)

print("Yes" if can else "No")
li = ['SUN','SAT','FRY','THU','WED','TUE','MON']
x = input()
print(li.index(x))

### FIXED CODE ###

li = ['SAT','FRI','THU','WED','TUE','MON','SUN']
x = input()
print(li.index(x)+1)
s=input()
cnt=0
cntlen=[]
for i in range(len(s)):
    if s[i]=='A' or s[i]=='C' or s[i]=='G' or s[i]=='T':
        cnt+=1
    else:
        cntlen.append(cnt)
        cnt=0
print(max(cntlen))

### FIXED CODE ###

s=input()
cnt=0
cntlen=[]
for i in range(len(s)):
    if s[i]=='A' or s[i]=='C' or s[i]=='G' or s[i]=='T':
        cnt+=1
    else:
        cntlen.append(cnt)
        cnt=0
cntlen.append(cnt)
print(max(cntlen))
from sys import exit

x=int(input())
for i in range(0,201):
	for j in range(-200,i):
		if i**5-j**5==x:
			print(i,j)
			exit()

### FIXED CODE ###

s=input()
if s=="ABC":
	print("ARC")
else:
	print("ABC")
N,K = map(int,input().split())
S = list(input())
i = 1
while K >= 1 and i < N:
    if S[i] != S[0]:
        while i<N and S[i] != S[0]:
            S[i] = S[0]
            i += 1
        K -= 1
    i += 1
ans = 0
for i in range(1,N-1):
    if S[i] == "L" and S[i-1] == "L":
        ans += 1
    elif S[i] == "R" and S[i+1] == "R":
        ans += 1
if S[0] == "R" and S[1] == S[0]:
    ans += 1
if S[-1] == "L" and S[-2] == S[-1]:
    ans += 1
print(ans)

### FIXED CODE ###

N,K = map(int,input().split())
S = list(input())
i = 1
if N == 1:
    print(0)
    exit()
while K >= 1 and i < N:
    if S[i] != S[0]:
        while i<N and S[i] != S[0]:
            S[i] = S[0]
            i += 1
        K -= 1
    i += 1
ans = 0
for i in range(1,N-1):
    if S[i] == "L" and S[i-1] == "L":
        ans += 1
    elif S[i] == "R" and S[i+1] == "R":
        ans += 1
if S[0] == "R" and S[1] == S[0]:
    ans += 1
if S[-1] == "L" and S[-2] == S[-1]:
    ans += 1
print(ans)
#入力
N = int(input())
Y = int(input())


#一万円の枚数を算出
if int(Y/10000)>0:
    x = int(Y/10000)
    
else:
    x = 0
    
    
#五千円の枚数を算出

#お年玉から万の位を除いた値
under_tenthousand = Y-x*10000

if int(under_tenthousand/5000)>0:
    y = int(under_tenthousand/5000)
    
else:
    y = 0
    
    
#千円の枚数を算出

#この時点でお年玉は五千円未満となっている
under_fivethousand = under_tenthousand-y*5000

if (under_fivethousand/1000)>0:
    z = under_fivethousand/1000
    
else:
    z = 0
    
    
#合計枚数の確認
if N==x+y+z:
    print(x, y, z, sep=" ")
    
else:
    print(-1, -1, -1, sep=" ")

### FIXED CODE ###

#入力
N, Y = map(int, input().split())


#総当たりで合計金額を算出
x = []
y = []
z = []

for num_ten_thousand in range(0, N+1):
    for num_five_thousand in range(0, N+1):
            
            #千円の枚数を算出
            if N-(num_ten_thousand+num_five_thousand)>=0:
                num_one_thousand = N-(num_ten_thousand+num_five_thousand)
            
            #合計金額を算出
            total = num_ten_thousand*10000 + num_five_thousand*5000 + num_one_thousand*1000
            
            #（合計金額がYと等しいか・合計枚数がNと等しいか）を確認し答えをリストに格納
            if Y==total and N==num_ten_thousand+num_five_thousand+num_one_thousand:
                x.append(num_ten_thousand)
                y.append(num_five_thousand)
                z.append(num_one_thousand)
                
                
#答えを出力
if not x:
    print(-1, -1, -1, sep=" ")
    
else:
    print(x[0], y[0], z[0], sep=" ")