Harryxun/stf_run huggingface dataset:
import math

MOD = 1000000000 + 7

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

l = 1
for i in A:
    l = lcm(l, i)

ans = 0
for i in A:
    ans += (l // i) % MOD
print(int(ans % MOD))

### FIXED CODE ###

from fractions import gcd

MOD = 1000000000 + 7

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

l = 1
ans = 0
for a in A:
    g = gcd(a, l)
    l = (l // g) * a
    ans = (ans * (a // g)) % MOD
    ans = (ans + (l // a)) % MOD
print(int(ans))
N = int(input())
A = list(map(int, input().split()))
ans = int(1)
for number in A:
  ans *= number
if ans <= 1000000000000000000:
  print(int(ans))  
else:
  print('-1')

### FIXED CODE ###

A, B = list(map(int, input().split()))
print(A*B)
a= int(input())
b=int(input())
print(int((b-1)/(a-1)+0.99999))


### FIXED CODE ###

a,b=map(int,input().split())
now=a
i=1
if b>1:
    while now<b:
        now+=a-1
        i+=1
    print(i)
else:
    print(0)
n = int(input())
s = [input() for _ in range(n)]

import numpy as np
t = np.unique(np.array(s), return_counts=True)
m = max(t[1])
ans = []
for i in range(len(t[1])):
    if t[1][i] == m:
        ans += [t[0][i]]

for i in range(len(ans)): print(ans[i])

### FIXED CODE ###

n = int(input())
s = [input() for _ in range(n)]
s.sort()

a = ""
tt = [[],[]]
for i in s:
    if a != i:
        a = i
        tt[0] += [i]
        tt[1] += [1]
    else:
        tt[1][-1] += 1
t = tt
m = max(t[1])
ans = []
for i in range(len(t[1])):
    if t[1][i] == m:
        ans += [t[0][i]]

for i in range(len(ans)): print(ans[i])
def func():
    tvs = []
    for i in range(num):
        tvs.append((-1, -1))
    for i in range(len(bans)):
        now = bans[i][0]
        can = bans[i][1]
        for j, tv in enumerate([tv for tv in tvs if tv[1] == can] + [tv for tv in tvs if tv[1 != can]]):
            if tv[1] == -1 or (tv[1] == can and tv[0] <= now) or tv[0] <= now - 1:
                del tvs[j]
                tvs.append((bans[i][1], can))
                break
        else:
            return False
    return True


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

bans = []
for i in range(n):
    s, t, c = map(int, input().split())
    bans.append((2 * s, 2 * t, c))
bans.sort(key=lambda x: x[0])

for num in range(1, 1024):
    if func():
        print(num)
        break


### FIXED CODE ###

def func():
    tvs = []
    for i in range(num):
        tvs.append((-1, -1))
    for i in range(len(bans)):
        now = bans[i][0]
        can = bans[i][2]
        tvs = [tv for tv in tvs if tv[1] == can] + [tv for tv in tvs if tv[1] != can]
        for j, tv in enumerate(tvs):
            if tv[1] == -1 or (tv[1] == can and tv[0] <= now) or tv[0] <= now - 1:
                del tvs[j]
                tvs.append((bans[i][1], can))
                break
        else:
            return False
    return True


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

bans = []
for i in range(n):
    bans.append(tuple(map(int, input().split())))
bans.sort(key=lambda x: x[0])

for num in range(1, 1024):
    if func():
        print(num)
        break
import collections

def factor(m):
    num=m
    s=[]
    i=2
    while i*i<=m:
        if num%i:
            i+=1
        else:
            s.append(i)
            num//=i
    if num!=1:
        s.append(num)
    return s

def conb(n,r):
    r=min(r,n-r)
    N,R=n,r
    for i in range(1,r):
        N*=n-i
        R*=r-i
    return N//R
	
n,m=map(int,input().split())
a=factor(m)
b=collections.Counter(a)
mod=10**9+7
ans=1
for i in b.values():
    ans=(ans*conb(n+i-1,i))%mod
print(ans)

### FIXED CODE ###

import collections

def factor(m):
    num=m
    s=[]
    i=2
    while i*i<=m:
        if num%i:
            i+=1
        else:
            s.append(i)
            num//=i
    if num!=1:
        s.append(num)
    return s

def conb(n, r):
	N, R = n, r
	for i in range(1, r):
		N *= n-i
		R *= r-i
	return N // R
	
n,m=map(int,input().split())
a=factor(m)
b=collections.Counter(a)
mod=10**9+7
ans=1
for i in b.values():
    ans=(ans*conb(n+i-1,i))%mod
print(ans)
a,b,x=map(int,input().split())
if a*a*b<2*x:
  print(math.degrees(math.atan((2*x/(a*a)-b)/(a*a))))
else:
  print(90-math.degrees(math.atan(2*x/(b*b))))

### FIXED CODE ###

import math
a,b,x=map(int,input().split())
if a*a*b<2*x:
  print(math.degrees(math.atan(2*(a*a*b-x)/(a**3))))
else:
  print(math.degrees(math.atan(a*b*b/2/x)))
pi = round((A*3 + P)/2)




return pi

### FIXED CODE ###

a,p=map(int,input().split())
print((a*3+p)//2)
A = int(input())
B = int(input())
T = int(input())

print(T/A * B)

### FIXED CODE ###

n = input().split()
A = int(n[0])
B = int(n[1])
T = int(n[2])

print(T//A  * B)
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

    # divisors.sort()
    return divisors

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

a,b=map(int,input().split())
ad=set(make_divisors(a))
bd=set(make_divisors(b))
common=ad & bd
pr=set(primes(max(common)))
ans=common & pr 
print(len(ans)+1)



### FIXED CODE ###

#!/usr/bin/env python3
import numpy as np


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

def seachPrimeNum(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2, N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]


def prime3(n):
    counter = 0
    primes = [2, 3]

    for n in range(5, n, 2):
        isprime = True
        for i in range(1, len(primes)):
            counter += 1
            if primes[i] ** 2 > n:
                break
            counter += 1
            if n % primes[i] == 0:
                isprime = False
                break
        if isprime:
            primes.append(n)
    return primes

a,b=map(int,input().split())
# a=b=10**10
count=0
ad=set(make_divisors(a))
bd=set(make_divisors(b))
# print(ad)
common=ad & bd
# print(common)
l=[]
for s in common:
    if is_prime(s):
        count+=1
print(count+1)
# pr=set(seachPrimeNum(max(common)))
# ans=common & pr 
# print(ans)
# print(len(ans)+1)
a,b,c=map(int,input(),split());print(c//a*b)

### FIXED CODE ###

a,b,c=map(int,input().split());print(c//a*b)
s = input()

ans =0

for i in range(leg(s)):
 if s[i] =="+":
   ans += 1
 else:
  ans -=1
print(ans)



### FIXED CODE ###

S = input()

ans = 0
for i in range(len(S)):
    if S[i]=="+":
        ans += 1
    else:
        ans -= 1
        
print(ans)
n,p=map(int,input().split())
l=list(map(lambda x:int(x)%2,input().split()))
a,b=0,0
for i in l:
  if l%2>0:
    a+=1
  else:
    b+=1
if a==0:
  if p==0:
    print(2**n)
  else:
    print(0)
else:
  print(2**(n-1))

### FIXED CODE ###

n,p=map(int,input().split())
l=list(map(lambda x:int(x)%2,input().split()))
a,b=0,0
for i in l:
  if i>0:
    a+=1
  else:
    b+=1
if a==0:
  if p==0:
    print(2**n)
  else:
    print(0)
else:
  print(2**(n-1))
import math
import numpy as np
N, K=map(int, input().split())

p1=(N-K)/N
klist=list(range(1,K+1))

def calc(x, K):
  y=math.ceil((np.log(K)-np.log(x))/np.log(2))
  p=x*(0.5)**y
  
  return p

plist=map(calc, klist)
p2=sum(plist)
print(p1+p2)


### FIXED CODE ###

from math import ceil
import numpy as np
N,K=map(int, input().split())
#サイコロを振る　１以上K未満→コイン　K以上ゲーム終了、す抜けのかち
#コイン　表なら２倍　裏なら０　０なったら負け
ans=max( (N-K+1),0) /N

#(K-1)/N
# M*(2**x)>=K M:サイコロの目
# x*log(2)>=log(K/M)
lim=min(K-1,N)
for i in range(1,lim+1):
    x=ceil(np.log(K/i)/np.log(2))
    ans+=(1/N)*((0.5)**x)
print(ans)
# -*- coding:utf-8 -*-


def ID():
    N, M = [int(n) for n in input().split()]
    lst = [[n for n in input().split()] for _ in range(M)]
    sorted_lst = sorted(lst, key=lambda x: int(x[1]))
    memo = {}
    result = {}
    for p, x in sorted_lst:
        if p not in memo:
            memo[p] = 1
        else:
            memo[p] += 1
        higher = p.zfill(6)
        lower = "{0:06d}".format(memo[p])
        result[p + x] = higher + lower

    for p, x in lst:
        print(result[p+x])


if __name__ == '__main__':
    ID()

### FIXED CODE ###

# -*- coding:utf-8 -*-


def Discount_Fare():
    X, Y = [int(n) for n in input().split()]
    print(X + (Y // 2))


if __name__ == '__main__':
    Discount_Fare()
N, K = map(int, input().split())
X = list(map(int, input().split()))

x_minus = [a for a in X if a < 0]
x_plus = [a for a in X if a >= 0]

ans = float("inf")
for i in range(K+1):
    if i == 0:
        if len(x_plus) >= K:
            dis = x_plus[K - 1]
            ans = min(ans, dis)
        else:
            continue
    if i != 0:
        if len(x_minus) > i:
            dis = 2 * abs(x_minus[-i]) + x_plus[K - i - 1]
            ans = min(ans, dis)
        else:
            continue


print(ans)


### FIXED CODE ###

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

x_minus = [a for a in X if a < 0]
x_plus = [a for a in X if a >= 0]

ans = float("inf")
for i in range(K+1):
    if i == 0:
        if len(x_plus) >= K:
            dis = x_plus[K - 1]
            ans = min(ans, dis)
        else:
            continue
    elif 1 <= i <= K - 1:
        if len(x_minus) >= i and len(x_plus) >= K - i:
            dis = 2 * abs(x_minus[-i]) + x_plus[K - i - 1]
            ans = min(ans, dis)
            dis = 2 * x_plus[K - i - 1] + abs(x_minus[-i])
            ans = min(ans, dis)
        else:
            continue
    elif i == K:
        if len(x_minus) >= K:
            dis = abs(x_minus[-K])
            ans = min(ans, dis)


print(ans)
h, w =map(int,input().split())

if h == 1 or w == 1:
  print(1)
elif (h * w) % 2 == 0:
  print((h * w) // 2)
elif (h * w) % 2 == 1:
  print(((h * W) // 2) + 1)
  


### FIXED CODE ###

h, w =map(int,input().split())

if h == 1 or w == 1:
  print(1)
else:
  if (h * w) % 2 == 0:
    print((h * w) // 2)
  else:
    print(((h * w) // 2) + 1)
a = list(input())
if (a[2] == a[3]) & (a[4] == a[5]):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

a = int(input());
b = a//500
c = a % 500 //5
print(b*1000+c*5)
a = list(map(int,input().split()))
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
x = a[0]
y = a[1]
z = 1
if(x is not z){
    c = (combinations_count(x, 2));
}
else{
    c = 0;
}
if(y is not z){
    d = (combinations_count(y, 2));
}
else{
    d = 0;
}
print(c + d)

### FIXED CODE ###

a = list(map(int,input().split()))
from operator import mul
from functools import reduce

def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom
x = a[0]
y = a[1]
if(x != 1) and (x != 0):
    c = (combinations_count(x, 2))
else:
    c = 0
if(y != 1) and (y != 0):
    d = (combinations_count(y, 2))
else:
    d = 0
print(c + d)
N = int(input())
S = str(input())
p = "abc"
print(s.count(p))

### FIXED CODE ###

N = int(input())
S = str(input())
S = S.replace("ABC","ab")
print(N - len(S))
b, c = map(str, input().split())
print(c.count('ABC'))

### FIXED CODE ###

a = input()
b = input()
print(b.count('ABC'))
import sys
sys.setrecursionlimit(10**9)
input = lambda:sys.stdin.readline().rstrip()

def Warshall_Floyd(n, d):
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j], d[i][k]+d[k][j])
    return d
############################
n, m, l = map(int, input().split())
f_inf = float('inf')
dist = [[f_inf]*n for _ in range(n)]
for i in range(m): dist[i][i] = 0

for _ in range(m):
    a, b, c = map(int, input().split())
    dist[a-1][b-1] = c
    dist[b-1][a-1] = c

dist = Warshall_Floyd(n, dist)

dist2 = [[f_inf]*n for _ in range(n)]
for i in range(m): dist2[i][i] = 0
for i in range(n):
    for j in range(n):
        if dist[i][j] <= l:
            dist2[i][j] = 1

dist2 = Warshall_Floyd(n, dist2)

q = int(input())
for _ in range(q):
    s, t = map(int, input().split())
    ans = dist2[s-1][t-1]
    if dist2[s-1][t-1] == f_inf:
        print(-1)
    else:
        print(ans-1)

### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    N, M, L = map(int, input().split())
    dist = [[float('inf')] * N for _ in range(N)]
    for _ in range(M):
        A, B, C = map(int, input().split())
        if C > L:
            continue
        A -= 1
        B -= 1
        dist[A][B] = C
        dist[B][A] = C

    for k in range(N):
        for i in range(N):
            for j in range(N):
                dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j])

    e = [[float('inf')] * N for _ in range(N)]
    for i in range(N):
        for j in range(N):
            if dist[i][j] <= L:
                e[i][j] = 1
    
    for k in range(N):
        for i in range(N):
            for j in range(N):
                e[i][j] = min(e[i][j], e[i][k] + e[k][j])


    Q = int(input())
    for _ in range(Q):
        s, t = map(int, input().split())
        s -= 1
        t -= 1
        if e[s][t] == float('inf'):
            print(-1)
            continue
        ans = e[s][t]
        print(ans-1)


if __name__ == "__main__":
    main()
a = int(input())
b = int(input())
if (3 <= a <= 5) and (3 <= b <= 5):
    print(a * b)

### FIXED CODE ###

a = input()
num = a.split()
x, y = int(num[0]), int(num[1])
if (1 <= x <= 100) and (1 <= y <= 100):
    print(str(x * y)+ ' ' +  str((x + y) * 2))
from collections import deque


n, m, p = map(int, input().split())
graph = [[-float('inf')] * n for i in range(n)]
for i in range(m):
    a, b, c = map(int, input().split())
    graph[a-1][b-1] = c - p


def bellman_ford(vst, graph, node_num):
    costs = [-float('inf')] * n
    costs[0] = 0
    update_points = []
    ans = 0
    v_nows = set([vst])
    for _ in range(n):
        v_changeds = set()
        for v_from in v_nows:
            for v_to, cost in enumerate(graph[v_from]):
                if cost == -float('inf'):
                    continue
                if costs[v_from] + cost > costs[v_to]:
                    costs[v_to] = costs[v_from] + cost
                    v_changeds.add(v_to)



    if not v_changeds:
        return costs


    que = deque()
    que.append(start)
    while que:
        edges = que.popleft()
        for to, costs in enumerate(graph[edges]):
            if costs != -float('inf'):
                graph[edges] = -float('inf')
                que.append(to)
    return costs



costs = bellman_ford(0, graph, n)
if costs[n-1] == -float('inf'):
    print(-1)
else:
    print(max(0, costs[n-1]))

### FIXED CODE ###

from collections import deque
NegInf = -float('inf')


n, m, p = map(int, input().split())
graph = [[] for _ in range(n)]
for i in range(m):
    a, b, c = map(int, input().split())
    graph[a-1].append((b-1, c-p))


def bellman_ford(vst, graph, node_num, NegInf):
    costs = [NegInf] * node_num
    costs[0] = 0
    v_nows = set([vst])
    for _ in range(n):
        v_changeds = set()
        for v_from in v_nows:
            for v_to, cost in graph[v_from]:
                c2 = costs[v_from] + cost
                if c2 > costs[v_to]:
                    costs[v_to] = c2
                    v_changeds.add(v_to)
        v_nows = v_changeds



    if not v_changeds:
        return costs

    for i in v_nows:
        costs[i] = NegInf

    que = deque(v_nows)
    while que:
        v_from = que.popleft()
        for v_to, cost in graph[v_from]:
            if costs[v_to] != NegInf:
                costs[v_to] = NegInf
                que.append(v_to)
    return costs


costs = bellman_ford(0, graph, n, -float('inf'))
if costs[n-1] == NegInf:
    print(-1)
else:
    print(max(0, costs[n-1]))
import sys
input = sys.stdin.readline()

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

for i in range(N):
    print(A.index(i+1) +1, end =' ')


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
  ans[a[i]-1] = i +1
for i in range(n):
  print(ans[i])
N, K = map(int, input().split())
A = list(map(int, input().split()))

for _ in range(min(K, 50)):
    lamp = [0 for i in range(N + 1)]
    for i in range(N):
        lamp[max(0, i - A[i])] += 1
        lamp[min(N, i + A[i] + 1)] -= 1

    for i in range(N):
        lamp[i] += lamp[i - 1]
    A = lamp

[print(A[i], end=' ') if i != N - 1 else print(A[i]) for i in range(N)]


### FIXED CODE ###

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

for i in range(min(K, 50)):
    B = [0 for i in range(N)]
    for j in range(0, N):
        l = max(0, j - A[j])
        r = min(N - 1, j + A[j])
        B[l] += 1
        if r + 1 < N:
            B[r + 1] -= 1

    for j in range(1, N):
        B[j] += B[j - 1]
        
    A = B

[print(i, end=' ') for i in B]
print()
N=int(input())
step=[int(i) for i in input().split()]

dp=[0 for _ in range(N+2)]

for i in range(N):
  cost_sum = dp[i][0]
  a=abs(step[i+1]-step[i])
  b=abs(step[i+2]-step[i])
  if a < b:
      dp[i+1] = [cost_sum + a, step[i+1]]
  else:
      dp[i+2] = [cost_sum + b, step[i+2]

print(dp(N))

### FIXED CODE ###

N = int(input())
hight_list = [int(item) for item in input().split()]


dp = [0 for i in range(N+1)]

dp[1] = abs(hight_list[1] - hight_list[0])

for i in range(2, N):
    jump1 = abs(hight_list[i] - hight_list[i-1])
    jump2 = abs(hight_list[i] - hight_list[i-2])

    dp[i] = min(dp[i-1] + jump1, dp[i-2] + jump2)


print(dp[N-1])
a=input()
b=input()
s=str(a)+str(b)
x=int(s)
flag=0
for i in range(1000):
	if i*i==x:
		flag=1
if flag==0:
	print('No')
else:
	print('Yes')


### FIXED CODE ###

a,b=map(int,input().split())
s=str(a)+str(b)
x=int(s)
flag=0
for i in range(1000):
	if i*i==x:
		flag=1
if flag==0:
	print('No')
else:
	print('Yes')
# coding: utf-8

w, h, N = list(map(int, input().split()))

rect = [0, w, 0, h]
for i in range(N):
    x, y, a = list(map(int, input().split()))
    rect[a - 1] = (lambda c, r, p: [r, c][p * (c - r) < 0])([x, y][a > 2], rect[a - 1], [1, -1][a % 2])

length = lambda x: [x, 0][x < 0]
print(length(rect[1] - rect[0]) * length(rect[3] - rect[2]))

### FIXED CODE ###

# coding: utf-8

def solve_a():
    candies = list(map(int, input().split()))
    for c in candies:
        if 2 * c == sum(candies):
            return "Yes"
    return "No"

print(solve_a())
n = int(input())
S = ['S']
H = ['H']
C = ['C']
D = ['D']
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1])
 elif x[0] == 'H':
  H.append(int(x[1])
 elif x[0] == 'C':
  C.append(int(x[1])
 else:
  D.append(int(x[1])
def print(list):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(list[0], i, end = "\n")
print(S)
print(H)
print(C)
print(D)
 

### FIXED CODE ###

n = int(input())
S = []
H = []
C = []
D = []
for i in range(0, n):
 x = list(input().split())
 if x[0] == 'S':
  S.append(int(x[1]))
 elif x[0] == 'H':
  H.append(int(x[1]))
 elif x[0] == 'C':
  C.append(int(x[1]))
 else:
  D.append(int(x[1]))
def pr(list, type):
 list.sort()
 for i in range(1, 14):
  if i not in list:
   print("{0} {1}".format(type, i))
pr(S, 'S')
pr(H, 'H')
pr(C, 'C')
pr(D, 'D')
N, K = map(int, input().split())
input = list(map(int, input().split()))

count, sum, start = 0, 0, 0
substring = []
while (True):
    sum += input[count]
    substring.append(sum)
    if start == len(input) - 1:
        break
    if count == len(input) - 1:
        start += 1
        count = start
        sum = 0
        continue

    count += 1
substring.sort(reverse=True)

result = substring[0]
for i in range(1, K):
    result = result & substring[i]

print(result)


### FIXED CODE ###

from statistics import mean

frame_num = int(input())
frame_value = list(map(int, input().split()))
avg = mean(frame_value)
min_frame = max(frame_value)
thumbanil = 0
for frame, value in enumerate(frame_value):
    diff = abs(avg - value)
    # print(diff, value, frame)
    if diff < min_frame:
        min_frame = diff
        thumbanil = frame

print(thumbanil)
import math
import statistics
import string


def intinput():
    return int(input())
def listintinput():
    return list(map(int, input().split()))
def splitintinput():
    return map(int, input().split())
def factorialsurplus(x, y, z):  # xからyまでの階乗をzで割ったあまりを求める
    ret = 1
    for i in range(x, y + 1):
        ret = (ret * i) % z
    return (ret)
def isprime(x):
    if x == 1:
        return False
    if x == 2:
        return True
    sq = int(math.sqrt(x))
    for i in range(2,sq+1):
        if x % i == 0:
            return False
    return True

a,b = splitintinput()
gcd = math.gcd(a,b)
print(int(a*b/gcd))

### FIXED CODE ###

# from fractions import gcd
# mod = 10 ** 9 + 7
# N = int(input())
# a = list(map(int,input().split()))
# a,b,c = map(int,input().split())
# ans = [0] * N
# math.ceilで切り上げ
# dp = [[0] * 4 for i in range(3)] #2次元配列初期化
# dp = [[[0] * 2 for i in range(3)] for j in range(5)]
# (ord('A'))でASCII出力 Aは65
import math
import statistics
import string


def intinput():
    return int(input())
def listintinput():
    return list(map(int, input().split()))
def splitintinput():
    return map(int, input().split())
def factorialsurplus(x, y, z):  # xからyまでの階乗をzで割ったあまりを求める
    ret = 1
    for i in range(x, y + 1):
        ret = (ret * i) % z
    return (ret)
def isprime(x):
    if x == 1:
        return False
    if x == 2:
        return True
    sq = int(math.sqrt(x))
    for i in range(2,sq+1):
        if x % i == 0:
            return False
    return True
def hcfnaive(a,b):
    if(b==0):
        return a
    else:
        return hcfnaive(b,a%b)

a,b = splitintinput()
g = hcfnaive(a,b)
print(int(a*b/g))
import numpy as np
  	l = map(int, input().split())
    [a, b, c, d] = l
    [A, B, C, D] = np.abs(l)
    [ab, cd, abcd, bc, Bb, ac] = [a*b, c*d, a*b*c*d, b*c, B*b, a*c]
    if abcd>=0:
        if bc<0:
            if Bb<0:
                print(b*c)
            elif a<0:
                print(b*d)
            else:
                print(a*d)
        elif a>=0:
            print(b*d)
        else:
            print(a*c)
    elif Bb<0:
        print(a*c)
    elif bc<0:
        if ac<0:
            print(b*d)
        else:
            print(a*c)
    
    else:
        print(b*d)
    

### FIXED CODE ###

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

nums = [a * c, a * d, b * c, b * d]

print(max(nums))