Harryxun/stf_run huggingface dataset:
mod = 1000000007
eps = 10**-9


def main():
    import sys
    from math import gcd
    input = sys.stdin.buffer.readline

    N = int(input())
    cnt = {}
    for _ in range(N):
        a, b = map(int, input().split())
        if a < 0:
            a = -a
            b = -b
        g = gcd(abs(a), abs(b))
        x = (a // g, b // g)
        if x in cnt:
            cnt[x] += 1
        else:
            cnt[x] = 1

    ans = 1
    num = 0
    for x in cnt:
        if cnt[x] == 0:
            continue
        a, b = x
        if b > 0:
            y = (b, -a)
        else:
            y = (-b, a)
        if y in cnt:
            nx = cnt[x]
            ny = cnt[y]
            cnt[y] = 0
            ans = (ans * ((pow(2, nx, mod) - 1) + (pow(2, ny, mod) - 1) + 1)%mod)%mod
        else:
            num += cnt[x]
    ans = (ans * pow(2, num, mod))%mod
    ans = (ans - 1)%mod
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from math import gcd
    input = sys.stdin.buffer.readline

    N = int(input())
    cnt = {}
    zz = 0
    for _ in range(N):
        a, b = map(int, input().split())
        if a == b == 0:
            zz += 1
            continue
        if a < 0:
            a = -a
            b = -b
        elif a == 0:
            if b < 0:
                b = -b
        g = gcd(abs(a), abs(b))
        x = (a // g, b // g)
        if x in cnt:
            cnt[x] += 1
        else:
            cnt[x] = 1

    ans = 1
    num = 0
    for x in cnt:
        if cnt[x] == 0:
            continue
        a, b = x
        if b > 0:
            y = (b, -a)
        else:
            y = (-b, a)
        if y in cnt:
            nx = cnt[x]
            ny = cnt[y]
            cnt[y] = 0
            ans = (ans * ((pow(2, nx, mod) - 1) + (pow(2, ny, mod) - 1) + 1)%mod)%mod
        else:
            num += cnt[x]
    ans = (ans * pow(2, num, mod))%mod
    ans = (ans - 1)%mod
    print((ans + zz)%mod)


if __name__ == '__main__':
    main()
inp = list(map(int, input().split()))
    n = inp[0]
    k = inp[1]
    print(str(abs(n%k)))

### FIXED CODE ###

inp = list(map(int, input().split()))
n = inp[0]
k = inp[1]
if n % k == 0:
  print('0')
else:
  print('1')
a, b, c = map(int, split(input()))
 
if (a < b < c):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a, b, c = map(int, input().split())
 
if (a < b < c):
    print("Yes")
else:
    print("No")
import bisect

N,K = map(int,input().split())
N = [int(n) for n in str(N)]
D = set(map(int,input().split()))
nums = []
for i in range(10):
  if i not in D:nums.append(i)
nums.sort()

i = len(N)-1
while i>=0:
  if N[i] not in nums:
    if nums[-1] < N[i]:
      prv_len = len(N)
      tmp_N = [int(s) for s in str(int(''.join([str(n) for n in N[:i]])) + 1)]
      N = tmp_N + [nums[0]]
      if len(N) > prv_len: i += 1
    else:
      j = bisect.bisect(nums,N[i])        
      N[i] = nums[j]
  i -= 1
print(''.join([str(n) for n in N]))

### FIXED CODE ###

import bisect

N,K = map(int,input().split())
N = [int(n) for n in str(N)]
D = set(map(int,input().split()))
nums = []
for i in range(10):
  if i not in D:nums.append(i)
nums.sort()

i = len(N)-1
while i>=0:
  if N[i] not in nums:
    if nums[-1] < N[i]:
      prv_len = len(N)
      tmp_N = [int(s) for s in str(int(''.join([str(n) for n in N[:i]])) + 1)] if len(N[:i])>0 else [1]
      N = tmp_N + [nums[0] for _ in range(prv_len-i)]
      if len(N) > prv_len: i += 1
    else:
      j = bisect.bisect(nums,N[i])
      N[i:] = [nums[j]] + [nums[0] for _ in range(len(N)-i-1)]
  #print(i,N)
  i -= 1
print(''.join([str(n) for n in N]))
#print(N)
#coding:utf-8
import sys,os
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

    H = II()
    from math import log2,floor
    print( 2**(floor(log2(H))+1)-1)

if __name__ == '__main__':
    main()

### FIXED CODE ###

#coding:utf-8
import sys,os
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

    H = II()
    from math import log2,floor
    print( 2**(floor(log2(H))+1)-1)

if __name__ == '__main__':
    main()
n, m = map(int, input().split())
favFood = [input().split() for i in range(n)]
for i in favFood:
    del i[:1]
    
count = 0

for i in range(1, m):
    check = True
    for j in range(n):
        if not (str(i) in favFood[j]):
            check = False
    if check:
        count += 1

print(count)


### FIXED CODE ###

a, b = map(int, input().split())

if b % a == 0:
    print(a + b)
else:
    print(b - a)
# dp[r][c][p] := 位置r, cに到着し、該当行で拾ったアイテムがp個の時の、最大価値
# r = 0〜R, c = 0〜C, p = 0〜3

R, C, k = list(map(int, input().split()))
items = [list(map(int, input().split())) for _ in range(k)]

dp = [[[0 for _ in range(4)] for _ in range(C+1+1)] for _ in range(R+1+1)]  # 番兵

item_values = [[0 for _ in range(C+1+1)] for _ in range(R+1+1)]

for item in items:
    item_values[item[0]][item[1]] = item[2]

for r in range(1, R+1):
    for c in range(1, C+1):
        value_here = item_values[r][c]

        if value_here == 0:
            dp[r][c][0] = max(
                dp[r][c-1][0],
                max(dp[r-1][c])
            )
            dp[r][c][1] = dp[r][c-1][1]
            dp[r][c][2] = dp[r][c-1][2]
            dp[r][c][3] = dp[r][c-1][3]
        
        else:
            dp[r][c][0] = max(
                dp[r][c-1][0],
                max(dp[r-1][c])
            )
            dp[r][c][1] = max([
                dp[r][c-1][1],
                dp[r][c-1][0] + value_here,
                max(dp[r-1][c]) + value_here
            ])

            dp[r][c][2] = max(dp[r][c-1][2], dp[r][c-1][1] + value_here)
            dp[r][c][3] = max(dp[r][c-1][3], dp[r][c-1][2] + value_here)
            
print(max(dp[R][C]))

# print(dp)


### FIXED CODE ###

s = input()
if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)
n=int(input())
a=list(map(int,input().split()))
d=list()
for c in range(n):
  b=0
  while a[c]%2==0:
    a[c]=a[c]/2
    b+=1
  d[c].append(b)
print(max(d))

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
d=[]
for c in range(n):
  b=0
  while a[c]%2==0:
    a[c]=int(a[c]//2)
    b+=1
  d.append(b)
print(min(d))
n, k = map(int, input().split())

if k == 0:
  print(n**2)
  exit()


ans = 0
for b in range(1, n+1):
  ans += int(N/b) * max(0, b-k)
  ans += max(0, n%b+(1-k))
  
print(ans)


### FIXED CODE ###

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

if k == 0:
  print(n**2)
  exit()


ans = 0
for b in range(1, n+1):
  ans += n//b * max(0, b-k)
  ans += max(0, n%b+(1-k))
  
print(ans)
import math

def main():
    n = int(input())
    t, a = map(int, input().split())
    h = list(map(int, input().split()))

    ans = 0
    temp = math.inf
    for i in range(n):
        if temp > abs(a - (t - h[i] * 0.006)):
            temp = abs(a - (t - h[i] * 0.006))
            ans = i + 1
        
    print(ans)

main()


### FIXED CODE ###

def main():
    n = int(input())
    t, a = map(int, input().split())
    h = list(map(int, input().split()))

    ans = 0
    temp = float('inf')
    for i in range(n):
        if temp > abs(a - (t - h[i] * 0.006)):
            temp = abs(a - (t - h[i] * 0.006))
            ans = i + 1
        
    print(ans)

main()
import numpy as np
import sys
input = sys.stdin.readline
N,W = map(int,input().split())
dp = np.zeros(W+1,dtype=int)
for i in range(N):
    w,v = map(int,input().split())
    dp[w:] = np.maximum(dp[w:],dp[:-w]+v)
print(dp[-1])

### FIXED CODE ###

import numpy as np
import sys
input = sys.stdin.readline
N,W = map(int,input().split())
dp = np.zeros(W+1,dtype=int)
for i in range(N):
    w,v = map(int,input().split())
    dp[w:] = np.maximum(dp[w:],dp[:-w]+v)
print(dp[-1])
a = [int(input())for in range(6)]
if a[4] - a[0] > a[5]:
    print(":(")
else:
    print("Yay!")

### FIXED CODE ###

a = [int(input())for i in range(6)]
if a[4] - a[0] > a[5]:
    print(":(")
else:
    print("Yay!")
import math

a, b = map(int, input().split())
ab = int(str(a) + str(b))
for i in range(1, math.sqrt(ab) + 2):
    if i ** 2 == ab:
        print('Yes')
        break
else:
    print('No')

### FIXED CODE ###

a, b = map(str, input().split())
c = int(a+b)
ans = 'No'
for i in range(4, 317):
    if i**2 == c:
        ans = 'Yes'
        break
print(ans)
import math

A = [0]*200001
for i in range(18):
    for j in range(2**i,2**(i+1)):
        if j <= 200000:
            A[j] = i + 1

def bii(x):
    a = A[x]
    o = [0]*a
    for i in range(a):
        o[i] = x % 2
        x //= 2
    return o

def f(x):
    bi = bii(x)
    popcount = sum(bi)
    a = x % popcount
    if a == 0:
        return 1
    else:
        return f(a)+1

N = int(input())
X = list(map(int,list(input())))
X.reverse()

popc = sum(X)
D = dict()
E = dict()
for j in [popc-1,popc+1]:
    E[j] = 0
    D[j] = [0]*N
    b = 1
    for i in range(N):
        D[j][i] = b
        E[j] += X[i] * b
        E[j] %= j
        b *= 2
        b %= j

aaaa = []
for i in range(N):
    an = X[-(i+1)]
    bb = 1 - 2 * an
    #もしi桁目が1ならば、ビット反転によってpopcとXは減る
    #もしi桁目が0ならば、ビット反転によってpopcとXは増える
    j = popc + bb
    su = (E[j] + bb * D[j][-(i+1)] + j) % j
    if su == 0:
        print(1)
    else:
        print(f(su)+1)

### FIXED CODE ###

import math

A = [0]*200001
for i in range(18):
    for j in range(2**i,2**(i+1)):
        if j <= 200000:
            A[j] = i + 1

def bii(x):
    a = A[x]
    o = [0]*a
    for i in range(a):
        o[i] = x % 2
        x //= 2
    return o

def f(x):
    bi = bii(x)
    popcount = sum(bi)
    a = x % popcount
    if a == 0:
        return 1
    else:
        return f(a)+1

N = int(input())
X = list(map(int,list(input())))
X.reverse()

popc = sum(X)
D = dict()
E = dict()
for j in [popc-1,popc+1]:
    E[j] = 0
    D[j] = [0]*N
    b = 1
    if j == 0:
        continue
    for i in range(N):
        D[j][i] = b
        E[j] += X[i] * b
        E[j] %= j
        b *= 2
        b %= j

aaaa = []
for i in range(N):
    an = X[-(i+1)]
    bb = 1 - 2 * an
    #もしi桁目が1ならば、ビット反転によってpopcとXは減る
    #もしi桁目が0ならば、ビット反転によってpopcとXは増える
    if popc == 1 and an == 1:
        print(0)
        continue
    j = popc + bb
    su = (E[j] + bb * D[j][-(i+1)] + j) % j
    if su == 0:
        print(1)
        continue
    else:
        print(f(su)+1)
        continue
r, g, b = map(int, input().split)

Number = r * 100 + g *10 + b

if (Number % 4) == 0:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

r, g, b = map(int, input().split())

Number = r * 100 + g *10 + b

if (Number % 4) == 0:
  print("YES")
else:
  print("NO")
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

s = [0]*4
N = i()
S = l()
for i in range(N):
    if S[i] == 'P':
        s[0] = 1
    if S[i] == 'W':
        s[1] = 1
    if S[i] == 'G':
        s[2] = 1
    if S[i] == 'Y'
        s[3] = 1
print(sum(s))

### FIXED CODE ###

import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

s = [0]*4
N = i()
S = L()
for i in range(N):
    if S[i] == 'P':
        s[0] = 1
    if S[i] == 'W':
        s[1] = 1
    if S[i] == 'G':
        s[2] = 1
    if S[i] == 'Y':
        s[3] = 1
if sum(s) == 3:
    print('Three')
else:
    print('Four')
import math 
a,b,n=map(int,input().split())
def calc(x):
    global a,b
    return math.floor(a*x/b)-a*math.floor(x/b)
bef=-100
count=0
for i in range(1,n+1):
    num=calc(i)
    if num==0:
        if bef!=0:
            if count==0:
                count+=1
            else:
                break
    kind.add(num)
    bef=num
print(bef)

### FIXED CODE ###

import math
a,b,n=map(int,input().split())
def calc(x):
    global a,b
    return math.floor(a*x/b)-a*math.floor(x/b)
print(calc(min(n,b-1)))
n=int(input())
print("Hello World" if n==1 else int(input())+int(input())


### FIXED CODE ###

n=int(input())

print("Hello World" if n==1 else int(input())+int(input()))
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
a.sort()
b.sort()
c.sort()
n=len(a)
j=0
k=0
for i in range(n):
    while j<n and b[j]<=a[i]:
        j+=1
    while k<n and c[k]<=b[j]:
        k+=1



### FIXED CODE ###

s=input()
k=int(input())
ans=-1
flag=True    
for i in range(min(len(s),k)):
    if s[i]!='1':
        flag=False
        ans=int(s[i])
        break
if flag:
    print(1)
else:
    print(ans)
n,k=map(int,input().split())
a=list(map(int,input().split()))
mod=10**9+7
dp=[0]*(k+1)
for i in range(a[0]+1):
    dp[i]=1
for i in range(1,n):
    u=a[i]
    h=dp[:]
    for j in range(u+1,k+1):
        h[j]=(dp[j]-dp[j-u-1])%mod
    for j in range(1,k+1):
        h[j]=(h[j]+h[j-1])%mod
    dp=h
print(dp[k])


### FIXED CODE ###

import itertools
inf=float("inf")
n=int(input())
a=list(map(int,input().split()))
for i in range(1,n):
    a[i]+=a[i-1]
a.append(0)
dp=[[0]*n for i in range(n)]
for l in range(1,n):
    for right in range(l,n):
        left=right-l
        num=inf
        for mid in range(left,right):
            num=min(num,dp[left][mid]+dp[mid+1][right])
        dp[left][right]=num+a[right]-a[left-1]
print(dp[0][n-1])
l, r = map(int, input().split())

numbers = list(range(l, r+1))

amari = list(set([x%2019 for x in numbers]))

mods = []
for i in range(len(amari)):
    for j in range(len(amari)):
        if i == j:
            continue
        mods.append((amari[i]*amari[j]%2019))

print(min(mods))

### FIXED CODE ###

l, r = map(int, input().split())

if r-l>2019:
    print(0)
    exit()

numbers = list(range(l, r+1))


amari = list(set([x%2019 for x in numbers]))
#print(amari)


cnt = 2019
for i in range(len(amari)):
    for j in range(len(amari)):
        if i == j:
            continue
        if amari[i]*amari[j]%2019 < cnt:
            cnt = amari[i]*amari[j]%2019


print(cnt)
a, b, c, d = map(int, input().split())
if b-a <= d or c-b <= d:
    print(Yes)
else:
    print("No")

### FIXED CODE ###

a, b, c, d = map(int, input().split())
if abs(c-a) <= d or (abs(c-b) <= d and abs(b-a) <=d):
    print("Yes")
else:
    print("No")
l = iin()
stack = []

ans = [[1, 2, 0]]
x = l
while True:
    if x == 1:
        break
    while x % 2 == 0:
        x //= 2
        stack.append('*2')
    if x == 1:
        break
    x -= 1
    stack.append('+1')

last_v_num = 2
x = 1#L, つまりパスの数
while len(stack) > 0:
    op = stack.pop()
#    print(op)
    if op == '+1':
        x += 1#パスの数を増やす
        ans.append([1, last_v_num, x - 1])#頂点1と最後の頂点を直接結ぶ, 辺の重みはパスの数 - 1
    elif op == '*2':
        x *= 2#パスの数を増やす
        for i in range(len(ans)):
            ans[i][2] *= 2#w *= 2して, 既存のパスの重みを2倍にする
        #最後の頂点の後ろに, 新たな頂点を加えて結ぶ, 辺の重みは0と1
        ans.append([last_v_num, last_v_num + 1, 0])
        ans.append([last_v_num, last_v_num + 1, 1])
        last_v_num += 1

N = last_v_num
M = len(ans)
print(N, M)
for u, v, w in ans:
    print(u, v, w)

### FIXED CODE ###

def iin(): return int(input())

l = iin()
stack = []

ans = [[1, 2, 0]]
x = l
while True:
    if x == 1:
        break
    #x > 2を条件に加えた理由: 
    #x = 1 -> 2の操作を*2で済ませると[1, 2, 0], [2, 3, 0], [2, 3, 1] となり、
    #頂点数が21以上になるケースが出るため, x = 1 -> 2は+1で済ませる
    while x % 2 == 0 and x > 2:
        x //= 2
        stack.append('*2')
    if x == 1:
        break
    x -= 1
    stack.append('+1')

last_v_num = 2
x = 1#L, つまりパスの数
while len(stack) > 0:
    op = stack.pop()
#    print(op)
    if op == '+1':
        x += 1#パスの数を増やす
        ans.append([1, last_v_num, x - 1])#頂点1と最後の頂点を直接結ぶ, 辺の重みはパスの数 - 1
    elif op == '*2':
        x *= 2#パスの数を増やす
        for i in range(len(ans)):
            ans[i][2] *= 2#w *= 2して, 既存のパスの重みを2倍にする
        #最後の頂点の後ろに, 新たな頂点を加えて結ぶ, 辺の重みは0と1
        ans.append([last_v_num, last_v_num + 1, 0])
        ans.append([last_v_num, last_v_num + 1, 1])
        last_v_num += 1

N = last_v_num
M = len(ans)
print(N, M)
for u, v, w in ans:
   print(u, v, w)
a = input()
b = input()

list_a = [0]*int(b)
list_b = [0]*int(a)

for i in range(0,int(b)):
    list_a[i] = int(a)*10**i

for i in range(0,int(a)):
    list_b[i] = int(b)*10**i
    
a_r = sum(list_a) 
b_r =sum(list_b)

if(a<b):
    print(str(a_r))
elif(a>b):
    print(str(b_r))
else:
    print(str(a_r))

### FIXED CODE ###

a, b = input().split()

list_a = [0]*int(b)
list_b = [0]*int(a)

for i in range(0,int(b)):
    list_a[i] = int(a)*10**i

for i in range(0,int(a)):
    list_b[i] = int(b)*10**i
    
a_r = sum(list_a) 
b_r =sum(list_b)

if(a<b):
    print(str(a_r))
elif(a>b):
    print(str(b_r))
else:
    print(str(a_r))
#include <algorithm>
#include <iostream>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; ++i)
using namespace std;

int main() {
  int N, K;
	cin >> N >> K;
  vector<int> c(N);
	REP(i,N) {
		int a; cin >> a; c[--a]++;
	}
	sort(c.begin(), c.end(), greater<int>());
	int s = N;
	REP(i,K) s -= c[i];
	cout << s << endl;
	return 0;
}

### FIXED CODE ###

N,K=map(int,input().split())
B=[0]*N
for i in map(int,input().split()):B[~-i]+=1
print(sum(sorted(B)[:-K]))
a1,a2,a3 = input().split(" ")

a12 = abs(a1 - a2)
a13 = abs(a1 - a3)
a23 = abs(a2 - a3)

min_num = min(a12,a13, a23)

print(sum(a12,a13,a23) - min_num)



### FIXED CODE ###

a1,a2,a3 = map(int,input().split(" "))


a12 = abs(a1 - a2)
a13 = abs(a1 - a3)
a23 = abs(a2 - a3)

max_num = max(a12,a13, a23)

print(a12 + a13 + a23 - max_num)
A,B,K=map(int,input().split());print([i for i in range(A,0,-1)if1>A%i+B%i][K-1])

### FIXED CODE ###

#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18

A, B, K = map(int, raw_input().split())

cnt = 0

for i in range(1, max(A, B) + 1)[::-1]:
    if A % i == 0 and B % i == 0:
        cnt += 1
    if cnt == K:
        print i
        exit()
from math import factorial
import bisect

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

lst = sorted(lst)

ans = (-1,-1)
val = -1

def nCr(n,r):
    return factorial(n)/factorial(n-r) * factorial(r)

if n==2:
    print(*lst)
    exit()

for i in range(1, n):
    n = lst[i]
    r1 = bisect.bisect_left(lst, n//2)
    r2 = bisect.bisect_right(lst, n//2)
    
    v1 = nCr(n, lst[r1])
    v2 = nCr(n, lst[r2])
    
    if v1 > val and n!=lst[r1]:
        val = v1
        ans = (n, lst[r1])
    if v2 > val and n!=lst[r2]:
        val = v2
        ans = (n, lst[r2])
    
print(*ans)

### FIXED CODE ###

n = int(input())
lst = list(map(int,input().split()))
lst.sort()

m = lst[-1]
line = m / 2
r = 10**10

for i in range(n):
    if abs(r-line) > abs(lst[i]-line):
        r = lst[i]
print(m,r)
S = input()
ans = 0 
ans_lis = [0]

for i in range(len(S)):
    if S[i] in "ACGT":
        ans = ans + 1
        if i == (len(S)-1):
            ans_lis.append(ans)
    elif S[i] not in ACGT:
        ans_lis.append(ans)
        ans = 0 

print(max(ans_lis))

### FIXED CODE ###

S = input()
ACGT = ["A","C","G","T"]

ans = 0 
ans_lis = [0]

for i in range(len(S)):
    if S[i] in ACGT:
        ans = ans + 1 
        if i == (len(S)-1):
            ans_lis.append(ans)
    elif S[i] not in ACGT:
        ans_lis.append(ans)
        ans = 0 

print(max(ans_lis))
import numpy as np
import sys
input = sys.stdin.readline


def main():
    N,K = map(int, input().split())
    A = np.array(sorted([int(i) for i in input().split()]))

    zero_left = np.searchsorted(A, 0, side='left')
    zero_right = np.searchsorted(A, 0, side='right')

    negative = zero_left
    positive = N - zero_right
    zero = zero_right - zero_left
    non_posi = negative * positive + zero * (N - zero) + zero * (zero - 1) // 2

    if K <= negative * positive:
        Nega = A[:zero_left]
        Posi = A[zero_right:]

        left = -(A[0]**2)
        right = 0
        while right - left > 1:
            x = (left + right) // 2
            count = np.searchsorted(Nega, x // Posi, side='right').sum()

            if count < K:
                left = x
            else:
                right = x

        print(right)

    elif K <= non_posi:
        print(0)

    else:
        Nega = np.sort(np.abs(A[:zero_left]))
        Posi = A[zero_right:]

        left = 0
        right = Posi[-1]**2
        while right - left > 1:
            x = (left + right) // 2
            A = np.searchsorted(Nega, x // Nega, side='right')
            B = np.searchsorted(Posi, x // Posi, side='right')
            count = 0
            count += A.sum()
            count += B.sum()
            count -= np.int_(np.where(A >= np.arange(1,negative+1), True, False)).sum()
            count -= np.int_(np.where(B >= np.arange(1,positive+1), True, False)).sum()
            count //= 2

            if count + non_posi < K:
                left = x
            else:
                right = x

        print(right)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import numpy as np
import sys
input = sys.stdin.readline


def main():
    N,K = map(int, input().split())
    A = np.array(sorted([int(i) for i in input().split()]))

    negative = A[A < 0]
    positive = A[A > 0]
    ln = len(negative)
    lp = len(positive)
    zero = np.count_nonzero(A == 0)

    def count(x):
        count = 0
        if x >= 0:
            count += N * zero
        count += np.searchsorted(A, x // positive, side='right').sum()
        count += N * ln - np.searchsorted(A, -(-x // negative), side='left').sum()
        count -= np.count_nonzero(A * A <= x)
        count //= 2

        return count


    left = -(10**18)
    right = 10**18
    while right - left > 1:
        x = (left + right) // 2
        if count(x) < K:
            left = x
        else:
            right = x

    print(right)


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

### FIXED CODE ###

A = [int(x) for x in input().split()]
num = 1
for i in A:
    if i == num:
        num += 1
    else:
        print(num)
        break
# -*- coding: utf-8 -*-
import math
def main():
    A,B,C,D = map(int,input().split())
    E = (C * D) // math.gcd(C,D)
    Cc = B / C
    Dd = B / D
    Ee = B / E
    flo = A-1
    Cf = flo / C
    Df = flo / D
    Ef = flo / E
    All = B-(math.floor(Cc)+math.floor(Dd)-math.floor(Ee))
    Sub = flo-(math.floor(Cf)+math.floor(Df)-math.floor(Ef))
    print(All - Sub)
if __name__ == '__main__':
    main()

### FIXED CODE ###

# -*- coding: utf-8 -*-
import fractions
def lcm(x, y):
    return (x*y) // fractions.gcd(x, y)
def main():
    A,B,C,D = map(int,input().split())
    E = lcm(C,D)
    Cc = B // C
    Dd = B // D
    Ee = B // E
    flo = A-1
    Cf = flo // C
    Df = flo // D
    Ef = flo // E
    All = B-(Cc+Dd-Ee)
    Sub = flo-(Cf+Df-Ef)
    print(int(All - Sub))
if __name__ == '__main__':
    main()