We often go to supermarkets to buy some fruits or vegetables, and on the tag there prints the price for a kilo. But in some supermarkets, when asked how much the items are, the clerk will say that $a$ yuan for $b$ kilos (You don't need to care about what "yuan" is), the same as $a/b$ yuan for a kilo.

Now imagine you'd like to buy $m$ kilos of apples. You've asked $n$ supermarkets and got the prices. Find the minimum cost for those apples.

You can assume that there are enough apples in all supermarkets.


-----Input-----

The first line contains two positive integers $n$ and $m$ ($1 \leq n \leq 5\,000$, $1 \leq m \leq 100$), denoting that there are $n$ supermarkets and you want to buy $m$ kilos of apples.

The following $n$ lines describe the information of the supermarkets. Each line contains two positive integers $a, b$ ($1 \leq a, b \leq 100$), denoting that in this supermarket, you are supposed to pay $a$ yuan for $b$ kilos of apples.


-----Output-----

The only line, denoting the minimum cost for $m$ kilos of apples. Please make sure that the absolute or relative error between your answer and the correct answer won't exceed $10^{-6}$.

Formally, let your answer be $x$, and the jury's answer be $y$. Your answer is considered correct if $\frac{|x - y|}{\max{(1, |y|)}} \le 10^{-6}$.


-----Examples-----
Input
3 5
1 2
3 4
1 3

Output
1.66666667

Input
2 1
99 100
98 99

Output
0.98989899



-----Note-----

In the first sample, you are supposed to buy $5$ kilos of apples in supermarket $3$. The cost is $5/3$ yuan.

In the second sample, you are supposed to buy $1$ kilo of apples in supermarket $2$. The cost is $98/99$ yuan.

Source: codeforces | Difficulty: EASY
Tags: Complete search

Implementation

Greedy algorithms


Solutions:
(m, n) = map(int, input().split())
a = []
for i in range(m):
	(x, y) = map(int, input().split())
	a.append(x / y * n)
print(min(a))


a = input().split()
stores = int(a[0])
kgs = int(a[1])
test = []
for i in range(stores):
	x = input().split()
	test.append(int(x[0]) / int(x[1]) * kgs)
print(min(test))


from math import *
sum = int()
mi = 1000
(a, b) = map(int, input().split())
for i in range(1, a + 1, 1):
	(x, y) = map(int, input().split())
	sum = x / y
	if sum < mi:
		mi = sum
print('%.8f' % (mi * b))


(n, m) = [int(i) for i in input().split()]
mi = 10 ** 9
for I in range(n):
	(a, b) = [int(i) for i in input().split()]
	mi = min(mi, a / b * m)
print(mi)


a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
min = b[0] / b[1]
for i in range(a[0] - 1):
	b = [int(i) for i in input().split()]
	c = b[0] / b[1]
	if c < min:
		min = c
print(min * a[1])


(n, m) = map(int, input().split())
market = []
r = 99999999999
for _ in range(n):
	(a, b) = map(int, input().split())
	market.append([a, b])
	p = a / b
	r = a / b if a / b < r else r
print(r * m)


(n, m) = map(int, input().split())
a = 500000.0
for i in range(n):
	(x, y) = map(int, input().split())
	x *= m
	a = min(a, float(x) / float(y))
print('%.10f' % a)


(n, amount) = map(int, input().split())
arr = []
for row in range(n):
	(money, weight) = map(int, input().split())
	arr.append(money / weight)
print(amount * min(arr))


(n, m) = map(int, input().split())
min_price = 1000
for _ in range(n):
	(a, b) = map(int, input().split())
	p = a / b
	if p < min_price:
		min_price = p
print(min_price * m)


i = input
(n, m) = map(int, i().split())
print(m * min((eval(i().replace(' ', '/')) for _ in [0] * n)))


(n, m) = map(int, input().split())
lst = []
for i in range(n):
	(a, b) = map(int, input().split())
	lst.append(round(m * a / b, 8))
print(min(lst))


(n, m) = [int(x) for x in input().split()]
k = []
for i in range(1, n + 1):
	(a, b) = [int(y) for y in input().split()]
	k.append(a / b)
print(min(k) * m)


(n, m) = map(int, input().split())
k = []
for i in range(n):
	(a, b) = map(int, input().split())
	k.append(a / b)
print(min(k) * m)


(n, m) = map(int, input().split())
ar = []
for i in range(n):
	(a, b) = map(int, input().split())
	ar.append(m * (a / b))
print('%.8f' % min(ar))


(m, n) = map(int, input().split())
l = []
for i in range(m):
	(a, b) = map(int, input().split())
	t = n / b * a
	l.append(t)
print('%.6f' % min(l))


(n, m) = map(int, input().split())
l = []
for i in range(n):
	(p, q) = map(int, input().split())
	l.append(p / q)
print(min(l) * m)


x = input().split()
(n, m) = [int(i) for i in x]
rates = [0] * n
for i in range(n):
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	rates[i] = a / b
mn = rates[0]
for i in range(n):
	mn = min(mn, rates[i])
print(mn * m)


l = list(map(int, input().split()))
lp = []
for _ in range(l[0]):
	l1 = list(map(int, input().split()))
	lp.append(l1[0] / l1[1])
print(min(lp) * l[1])


(s, a) = list(map(int, input().split(' ')))
r = []
for i in range(s):
	(q, s) = map(int, input().split())
	r.append(q * (a / s))
print(min(r))


(numberOfMarkets, kilosToBuy) = map(int, input().split(' '))
costs = []
for _ in range(numberOfMarkets):
	(cost, kilo) = map(int, input().split(' '))
	cost = cost / kilo
	costs.append(cost * kilosToBuy)
costs.sort()
print(costs[0])


(l, m) = list(map(int, input().split(' ')))
g = []
for i in range(l):
	(a, b) = tuple(map(int, input().split(' ')))
	g.append(a / b)
print(min(g) * m)


(n, m) = map(int, input().split())
res = []
for _ in range(n):
	(a, b) = map(int, input().split())
	res.append(m * a / b)
print(min(res))


nm = list(map(int, input().split(' ')))
cpk = []
for i in range(nm[0]):
	ab = list(map(int, input().split(' ')))
	cpk.append(ab[0] / ab[1] * nm[1])
print(min(cpk))


(n, m) = map(int, input().split())
kilo = 100000000
(mo1, k1) = (0, 0)
for i in range(n):
	(mo, k) = map(int, input().split())
	if kilo > mo / k:
		k1 = k
		mo1 = mo
		kilo = mo1 / k1
print('{0:.8f}'.format(m * (mo1 / k1)))


import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_ints_lists():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()
li1 = []
(n, m) = get_ints()
for i in range(n):
	li = []
	li = get_ints_lists()
	li1.append(li[0] / li[1])
q = min(li1)
print(round(q * m, 8))


(no_of_markets, kgs) = map(int, input().split())
yuan_kilo = [list(map(int, input().split())) for i in range(no_of_markets)]
cost_per_kg = [i[0] / i[1] for i in yuan_kilo]
print(round(min(cost_per_kg) * kgs, 8))


(n, m) = map(int, input().split())
min_cost = 101
while n:
	(a, b) = map(int, input().split())
	if min_cost > a / b:
		min_cost = a / b
	n -= 1
print(round(min_cost * m, 8))


Min = float('inf')
(n, m) = map(int, input().split())
for i in range(n):
	(a, b) = map(int, input().split())
	if a * m / b < Min:
		Min = a * m / b
print(Min)


(n, m) = list(map(int, input().split()))
ans = 10 ** 100
for i in range(n):
	(p, q) = list(map(int, input().split()))
	ans = min(ans, p / q * m)
print(ans)


(n, m) = map(int, input().split())
low = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if low == 0:
		low = a / b
	if low > a / b:
		low = a / b
print('%.8f' % (m * low))


import math
(n, m) = [int(i) for i in input().split()]
min = math.inf
for i in range(n):
	(yan, kg) = [int(i) for i in input().split()]
	if yan / kg < min:
		min = yan / kg
print(min * m)


(n, m) = map(int, input().split())
q = 10 ** 9
for s in range(0, n):
	e = list(map(int, input().split()))
	if e[0] / e[1] * m <= q:
		q = e[0] / e[1] * m
print(q)


(n, m) = map(int, input().split())
z = 1000000000
for i in range(n):
	(x, y) = map(int, input().split())
	if x / y < z:
		z = x / y
print(z * m)


(n, m) = map(int, input().split())
Minimum = 10000
for i in range(n):
	(a, b) = map(int, input().split())
	Minimum = min(Minimum, a * m / b)
print(Minimum)


def Solve():
	(n, m) = map(int, input().split())
	min_number = []
	for index in range(n):
		(a, b) = map(int, input().split())
		min_number.append(a * m / b)
	print('%.8f' % min(min_number))
Solve()


(n, m) = map(int, input().split())
m = float(m)
mi = []
for i in range(n):
	(a, b) = map(float, input().split())
	mi.append(a * m / b)
print(min(mi))


(n, m) = map(int, input().split())
l = []
for i in range(n):
	w = list(map(int, input().split()))
	l.append(w)
p = []
for i in range(n):
	x = l[i][0] / l[i][1]
	p.append(x)
x = min(p)
d = x * m
print(round(d, 8))


(n, m) = map(int, input().split())
(a, b) = map(int, input().split())
mi = a / b
for f in range(n - 1):
	(a, b) = map(int, input().split())
	if a / b < mi:
		mi = a / b
print(mi * m)


(n, m) = map(int, input().split())
p = []
for _ in range(n):
	(a, b) = map(int, input().split())
	p.append(float(a) / float(b))
print('%.20f' % (min(p) * m))


(n, m) = input().split(' ')
n = int(n)
m = int(m)
p = 100000
for i in range(n):
	(a, b) = input().split(' ')
	a = int(a)
	b = int(b)
	if a / b < p:
		p = a / b
print(p * m)


(a, b) = map(int, input().split())
list1 = []
for i in range(a):
	(c, d) = map(int, input().split())
	list1.append(c / d)
print(round(min(list1) * b, 7))


(n, m) = map(int, input().split())
ans = float('inf')
for x in range(n):
	(a, b) = map(int, input().split())
	ans = min(ans, m * (a / b))
print(ans)


(n, m) = [int(x) for x in input().split()]
mins = int(10000000000.0 + 7)
for _ in range(n):
	(a, b) = [int(x) for x in input().split()]
	mins = min(mins, a / b * m)
print('{0:.8f}'.format(mins))


(x, y) = map(int, input().split())
r = []
for i in range(x):
	(a, b) = map(int, input().split())
	r.append(a * y / b)
print(min(r))


(n, m) = map(int, input().split())
ans = 10 ** 9
for i in range(n):
	(a, b) = map(int, input().split())
	cost = a / b * m
	ans = min(ans, cost)
print(ans)


from fractions import Fraction
(n, m) = map(int, input().split())
res = []
for i in range(n):
	(x, y) = map(int, input().split())
	res.append(Fraction(x) / Fraction(y))
print(float(min(res) * m))


(n, m) = list(map(int, input().split()))
min = 9999999
for i in range(n):
	(a, b) = list(map(int, input().split()))
	z = a / b
	if z < min:
		min = z
print(min * m)


ip = input().split()
(n, m) = (int(ip[0]), int(ip[1]))
rates = []
for _ in range(n):
	rate_ip = input().split()
	(a, b) = (float(rate_ip[0]), float(rate_ip[1]))
	rates.append(a / b)
print(min(rates) * m)


(n, m) = map(int, input().split())
arr = []
for i in range(n):
	(a, b) = map(int, input().split())
	arr.append(a / b)
arr = sorted(arr)
print(m * arr[0])


(a, b) = map(int, input().split())
e = []
for x in range(a):
	(c, d) = map(int, input().split())
	e.append(c / d)
m = min(e) * b
print('{:.8f}'.format(m))


(n, m) = map(int, input().split())
l = 500000
for i in range(n):
	(a, b) = map(int, input().split())
	k = a / b * m
	if k < l:
		l = k
print(l)


a = [int(s) for s in input().split(' ')]
m = 99999999999999
for i in range(a[0]):
	b = [int(s) for s in input().split(' ')]
	if b[0] / b[1] < m:
		m = b[0] / b[1]
print(m * a[1])


(n, m) = input().split()
n = int(n)
m = int(m)
min = 1000
for i in range(0, n):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if x / y < min:
		min = x / y
print(round(min * m, 8))


(a, b) = map(int, input().split())
mas = []
c = d = 0
for i in range(a):
	(c, d) = map(int, input().split())
	mas.append(c / d)
mas.sort()
print(round(mas[0] * b, 6))


import getpass
import sys

def ria():
	return [int(i) for i in input().split()]
files = False
if getpass.getuser() == 'frohenk' and files:
	sys.stdin = open('test.in')
(n, m) = ria()
mini = 1000
for i in range(n):
	(a, b) = ria()
	mini = min(mini, a / b)
print(mini * m)


c = [int(y) for y in input().strip().split()]
n = c[0]
m = c[-1]
arr = []
for i in range(n):
	b = [int(y) for y in input().strip().split()]
	arr.append(b[0] / b[1])
x = min(arr) * m
print(x)


(n, m) = list(map(int, input().split()))
mn = 10 ** 9
for i in range(n):
	(a, b) = list(map(int, input().split()))
	mn = min(a / b * m, mn)
print(mn)


from __future__ import division, print_function
from sys import stdin, stdout

def r():
	return stdin.readline().strip().split()
(n, m) = map(int, r())
mi = -1
for i in range(n):
	(a, b) = map(int, r())
	if mi == -1:
		mi = a / b
	else:
		mi = min(mi, a / b)
print('{0:.8f}'.format(m * mi))


from math import inf
(n, m) = map(int, input().split())
answer = inf
for _ in range(n):
	(a, b) = map(int, input().split())
	answer = min(answer, a / b * m)
print(answer)


(n, m) = list(map(int, input().split()))
p = []
for i in range(n):
	p.append([int(j) for j in input().split()])
minimum = p[0][0] * m / p[0][1]
for j in p:
	if j[0] * m / j[1] < minimum:
		minimum = j[0] * m / j[1]
print(minimum)


(N, M) = map(int, input().split())
X = 10000
while N:
	(a, b) = map(int, input().split())
	if a / b < X:
		X = a / b
	N -= 1
print(M * X)


(n, m) = map(int, input().split())
x = 100001
for i in range(n):
	(a, b) = map(int, input().split())
	y = m * a / b
	if y < x:
		x = y
print(x)


(n, k) = list(map(int, input().strip().split()))
t = []
for i in range(n):
	(q, p) = list(map(int, input().strip().split()))
	t += [q * k / p]
print('{:.8f}'.format(min(t)))


import random
import functools
import itertools
import math
R = lambda type_='int': list(map(eval(type_), input().split(' ')))
(n, m) = R()
ans = 10000000000000
for i in range(n):
	(a, b) = R()
	ans = min(ans, a / b)
print(ans * m)


[n, m] = [int(x) for x in input().split()]
L = []
for i in range(n):
	[a, b] = [int(x) for x in input().split()]
	L.append(a / b)
print(m * min(L))


(n, m) = map(int, input().split())
ans = 10 ** 40
for _ in range(n):
	(a, b) = map(int, input().split())
	ans = min(ans, a / b * m)
print(ans)


def gis():
	return list(map(int, input().strip().split()))

def gi():
	return int(input())

def gss():
	return input().strip().split()

def problem():
	(n, m) = gis()
	maxi = 100
	for i in range(n):
		(a, b) = gis()
		maxi = min(maxi, a / b)
	print(maxi * m)
problem()


(n, m) = map(int, input().split())
n -= 1
(a, b) = map(float, input().split())
min = a / b
for i in range(n):
	(a, b) = map(float, input().split())
	if min > a / b:
		min = a / b
print(min * m)


(n, m) = map(int, input().split())
cost = 10 ** 7
for i in range(n):
	(a, b) = map(int, input().split())
	if a / b < cost:
		cost = a / b
print(cost * m)


(n, m) = map(int, input().split())
mncost = 101
for i in range(n):
	(a, b) = map(int, input().split())
	if a / b < mncost:
		mncost = a / b
print(mncost * m)


r = lambda : map(int, input().split())
(n, m) = r()
s = 100000000000.0
for _ in range(n):
	(a, b) = r()
	s = min(s, a / b)
print(s * m)


import sys
read = input().split(' ')
n = int(read[0])
m = int(read[1])
mn = sys.maxsize
for i in range(n):
	read = input().split(' ')
	a = int(read[0])
	b = int(read[1])
	if a / b < mn:
		mn = a / b
print(mn * m)


(a, b) = map(int, input().split())
m = 100000000
while a:
	(q, w) = map(int, input().split())
	c = q / w
	if m > c:
		m = c
	a -= 1
print(format(b * m, '.8f'))


(n, m) = map(int, input().split())
bruh = []
for i in range(n):
	(a, b) = list(map(int, input().split()))
	bruh.append(m * a / b)
print(min(bruh))


(n, m) = map(int, input().split())
min1 = 100000000
while n > 0:
	(a, b) = map(int, input().split())
	z = a / b
	if z < min1:
		min1 = z
	n = n - 1
str1 = min1 * m
str1 = format(str1, '.8f')
print(str1)


(n, m) = list(map(int, input().split()))
minn = float('inf')
for (j, i) in [list(map(int, input().split())) for _ in range(n)]:
	if j / i < minn:
		minn = j / i
print(m * minn)


(a, b) = map(int, input().split())
s = float('inf')
for i in range(a):
	(c, d) = map(int, input().split())
	if c / d < s:
		s = c / d
print(s * b)


(s, q) = list(map(int, input().split()))
l = []
for i in range(s):
	(a, b) = list(map(int, input().split()))
	p = a / b
	l.append(p)
price = q * min(l)
print(price)


(n, m) = map(int, input().split())
b = [list(map(int, input().split())) for i in range(n)]
print('{0:.8f}'.format(m * min([item[0] / item[1] for item in b])))


(stores, apples) = map(int, input().split())
price = False
for _ in range(stores):
	(a, b) = map(int, input().split())
	rate = a * apples / b
	if not price:
		price = rate
	elif rate < price:
		price = rate
print(format(price, '.8f'))


(n, m) = map(int, input().split())
p = []
for t in range(n):
	(a, b) = map(int, input().split())
	z = a / b * m
	g = round(z, 8)
	p.append(g)
p.sort()
print(p[0])


j = list(map(int, input().split()))
n = j[0]
m = j[1]
a = []
k = 0
l = 100000000000
for i in range(n):
	x = list(map(int, input().split()))
	g = x[0]
	h = x[1]
	k = m / h * g
	if k < l:
		l = k
print(l)


def yabloki(lst, m):
	a = list()
	for elem in lst:
		a.append(elem[0] / elem[1])
	return format(min([i * m for i in a]), '.8f')
(N, M) = [int(i) for i in input().split()]
b = list()
for i in range(N):
	s = [int(j) for j in input().split()]
	b.append(tuple(s))
print(yabloki(b, M))


(n, m) = map(int, input().split())
(a, b) = map(int, input().split())
mini = round(a / b, 8)
for i in range(n - 1):
	(a, b) = map(int, input().split())
	if mini > a / b:
		mini = a / b
print(round(m * mini, 8))


(n, m) = map(int, input().split())
Min = 10000000.0
for i in range(0, n):
	(a, b) = map(int, input().split())
	Min = min(Min, a / b)
print(round(m * Min, 8))


(n, m) = [int(x) for x in input().split()]
values = []
prices = []
for i in range(n):
	values = [int(i) for i in input().split()]
	prices.append(values[0] / values[1])
print(min(prices) * m)


(x, y) = [int(i) for i in input().split()]
minn = 99999999999999999999
for i in range(x):
	(a, b) = [int(i) for i in input().split()]
	if a / b < minn:
		minn = a / b
print(minn * y)


(n, m) = map(int, input().split())
min_ = float('inf')
for _ in range(n):
	(a, b) = map(int, input().split())
	p = m / b * a
	min_ = min(min_, p)
print(min_)


(n, m) = map(int, input().split())
minn = 100
for i in range(n):
	(a, b) = map(int, input().split())
	minn = min(minn, a / b)
print(minn * m)


import sys
(N, M) = map(int, input().split())
minimum = sys.maxsize
for i in range(N):
	(a, b) = map(int, input().split())
	if minimum > float(a) / b * M:
		minimum = float(a) / b * M
print(float(minimum))


(n, wanted) = list(map(int, input().strip().split()))
prices = []
for market in range(n):
	(a, b) = list(map(int, input().strip().split()))
	prices.append(a / b)
lowest_price = min(prices)
print(wanted * lowest_price)


st = [int(i) for i in input().split(' ')]
n = st[0]
m = st[1]
pr = []
for i in range(n):
	c = [int(j) for j in input().split(' ')]
	a = c[0]
	b = c[1]
	pr.append(a / b)
print(min(pr) * m)


(n, m) = [int(i) for i in input().split()]
(a, b) = [int(i) for i in input().split()]
minimum = a / b
for i in range(n - 1):
	(a, b) = [int(i) for i in input().split()]
	if a / b < minimum:
		minimum = a / b
print(minimum * m)


(n, m) = map(int, input().split())
a = []
for i in range(n):
	(d, e) = map(int, input().split())
	a.append(m * d / e)
print(min(a))


(n, m) = map(int, input().split())
(a, b) = map(int, input().split())
mn = a / b
for i in range(1, n):
	(a, b) = map(int, input().split())
	mn = min(a / b, mn)
print(m * mn)


l = [int(x) for x in input().split()]
n = l[0]
m = l[1]
minm = float('inf')
for i in range(n):
	a = [int(x) for x in input().split()]
	if a[0] / a[1] < minm:
		minm = a[0] / a[1]
print('%.8f' % (m * minm))


(n, m) = map(int, input().strip().split(' '))
pr = []
for i in range(n):
	(a, b) = map(float, input().strip().split(' '))
	pr.append(a / b)
pr.sort()
print(pr[0] * m)


import sys

def main():
	inp = sys.stdin.read().strip().split('\n')
	(n, m) = map(int, inp[0].split())
	t = []
	for s in inp[1:]:
		(a, b) = map(int, s.split())
		t.append(a / b * m)
	return min(t)
print(main())


x1 = input().split()
i1 = int(x1[0])
i2 = int(x1[1])
arr = []
for f1 in range(i1):
	x = input().split()
	i = int(x[0])
	j = int(x[1])
	if len(arr) == 0:
		arr.append(i)
		arr.append(j)
		continue
	if arr[0] / arr[1] > i / j:
		arr = [i, j]
print(arr[0] / arr[1] * i2)


a = [int(s) for s in input().split()]
n = int(999)
sy = a[0]
while sy > 0:
	b = [int(i) for i in input().split()]
	if n > b[0] / b[1]:
		n = b[0] / b[1]
	sy -= 1
print(n * a[1])


(n, m) = list(map(int, input().split()))
ar = []
for i in range(n):
	(a, b) = list(map(int, input().split()))
	ar.append(a / b)
ar = sorted(ar)
print(round(ar[0] * m, 8))


(n, m) = map(int, input().split())
ans = 19999999999.0
for i in range(n):
	(a, b) = map(int, input().split())
	ans = min(ans, a / b * m)
print(ans)


s = input().split()
n = int(s[0])
m = int(s[1])
p = 101
for i in range(n):
	s = input().split()
	x = int(s[0]) / int(s[1])
	if x < p:
		p = x
print(m * p)


(n, m) = map(int, input().split())
compare_list = []
for i in range(n):
	(a, b) = map(int, input().split())
	compare_list.append(a / b)
ans = min(compare_list) * m
print(ans)


(n, m) = map(int, input().strip().split(' '))
mini = 10 ** 9
for i in range(n):
	(a, b) = map(int, input().strip().split(' '))
	s = a / b
	if s < mini:
		mini = s
print(mini * m)


(n, m) = map(int, input().split())
d = {}
for i in range(n):
	k = tuple(map(int, input().split()))
	d[k] = k[0] / k[1]
	l = d.items()
	j = min(l, key=lambda x: x[1])
print(m * j[0][0] / j[0][1])


(n, m) = map(int, input('').split())
l = []
for _ in range(n):
	(a, b) = map(int, input('').split())
	l.append(a * m / b)
print('%.8f' % min(l))


l = input().split(' ')
n = int(l[0])
m = int(l[1])
t = []
i = 0
for i in range(n):
	l = input().split(' ')
	t.append(int(l[0]) / int(l[1]))
print(min(t) * m)


(n, m) = map(int, input().split())
mn = 10000.0
for i in range(n):
	(x, y) = map(int, input().split())
	mn = min(mn, x / y)
print('{0:.9f}'.format(mn * m))


(n, m) = map(int, input().split())
min = 1000.0
s = 0.0
for i in range(n):
	(a, b) = map(int, input().split())
	s = a / b
	if min > s:
		min = s
print(min * m)


(n, m) = map(int, input().split())
mn = float('inf')
for _ in range(n):
	(a, b) = map(int, input().split())
	mn = min(mn, m * a / b)
print(mn)


(n, m) = map(int, input().split())
min1 = float('inf')
for i in range(n):
	(a, b) = map(int, input().split())
	w = m * (a / b)
	if w < min1:
		min1 = w
print(min1)


(n, m) = map(int, input().split())
l = []
while n:
	(a, b) = map(int, input().split())
	l.append(m * a / b)
	n -= 1
print(round(min(l), 8))


foo = input().split(' ')
n = int(foo[0])
m = int(foo[1])
list0 = [0] * n
list1 = [0] * n
for i in range(n):
	list0[i] = input().split(' ')
	list1[i] = int(list0[i][0]) / int(list0[i][1])
	global a
	a = min(list1)
print(a * m)


(n, k) = map(int, input().split())
ar = []
for i in range(n):
	(a, b) = map(int, input().split())
	ar.append(a / b * k)
print('{:.10f}'.format(min(ar)))


(n, m) = [int(x) for x in input().split()]
best = 999999999999999999
for _ in range(n):
	(a, b) = [int(x) for x in input().split()]
	best = min(best, m * a / b)
print(best)


import sys
(n, m) = map(int, sys.stdin.readline().strip().split())
print(m * min(map(lambda x: x[0] / x[1], map(lambda line: list(map(int, line.strip().split())), sys.stdin))))


(n, m) = map(int, input().split())
s = set()
for i in range(n):
	(p, q) = map(int, input().split())
	s.add(p / q)
print(m * min(s))


fin = list(map(int, input().split()))
need = []
for x in range(fin[0]):
	inp = list(map(int, input().split()))
	need.append(inp[0] / inp[1])
print(round(min(need) * fin[1], 8))


(n, m) = [int(q) for q in input().split()]
prices = []
diffs = []
for _ in range(n):
	prices.append([int(r) for r in input().split()])
for i in prices:
	diffs.append(i[0] / i[1])
print(round(min(diffs) * m, 8))


from fractions import Fraction
(supermarkets, wanted_apples) = map(int, input().split())
best_price = Fraction(100000, 1)
for _ in range(supermarkets):
	(a, b) = map(int, input().split())
	price = Fraction(a, b)
	best_price = min(best_price, price)
print(float(wanted_apples * best_price))


(n, m) = map(int, input().split())
current = 1000000000000000000000000
for i in range(n):
	(a, b) = map(int, input().split())
	res = a / b
	if current > res:
		current = res
print(m * current)


(n, m) = map(int, input().split())
ans = 1000000000.0
for i in range(n):
	(a, b) = map(int, input().split())
	c = a / b
	ans = min(ans, c * m)
print(ans)


(n, m) = map(int, input().split())
cena = 100000
for i in range(0, n):
	(a, b) = map(int, input().split())
	novcena = a / b
	if novcena < cena:
		cena = novcena
print(cena * m)


minpr = 101
(n, m) = map(int, input().split())
for i in range(n):
	(a, b) = map(int, input().split())
	prpkg = a / b
	if prpkg < minpr:
		minpr = prpkg
print(minpr * m)


(n, m) = map(int, input().split())
k = 10000
for _ in range(n):
	(q, w) = map(int, input().split())
	if q / w < k:
		k = q / w
print(k * m)


q = lambda : map(int, input().split())
qi = lambda : int(input())
qs = lambda : input().split()
(n, m) = q()
(a, b) = q()
c = a / b
for i in range(n - 1):
	(a, b) = q()
	c = min(c, a / b)
print(f'{m * c:.8f}')


(n, m) = input().split()
n = int(n)
m = int(m)
arr = []
for i in range(n):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	arr.append(x / y)
mn = min(arr)
print('%.8f' % (mn * m))


(n, m) = map(int, input().split())
(Min, price) = (99999999, 0)
for i in range(n):
	(a, b) = map(int, input().split())
	Min = min(Min, a * m / b)
print(Min)


(n, m) = map(int, input().strip().split(' '))
best = float('inf')
for i in range(n):
	(a, b) = map(float, input().strip().split(' '))
	p = m * (a / b)
	if p < best:
		best = p
print('%.8f' % best)


(n, m) = [int(z) for z in input().split()]
tmp = 10000000
for i in range(n):
	(a, b) = [int(z) for z in input().split()]
	tmp = min(tmp, a / b)
print(tmp * m)


(n, m) = map(int, input().split())
best = 10000
for i in range(n):
	(a, b) = map(int, input().split())
	tmp = m * a / b
	best = min(best, tmp)
print(best)


(n, m) = map(int, input().split())
ans = 100000000000.0
for i in range(n):
	(a, b) = map(int, input().split())
	if a / b < ans:
		ans = a / b
print(m * ans)


r = lambda : list(map(int, input().split()))
(n, m) = r()
check = lambda x: x[0] / x[1]
print(min((check(r()) for x in range(n))) * m)


(n, m) = list(map(int, input().split()))
mini = 10000
for i in range(n):
	(a, b) = list(map(int, input().split()))
	if a * m / b < mini:
		mini = a * m / b
print(mini)


(n, m) = map(int, input().split())
minn = 10 ** 100
for i in range(n):
	(a, b) = map(int, input().split())
	if a / b < minn:
		minn = a / b
print(m * minn)


(n, m) = [int(a) for a in input().strip().split(' ')]
min_cost = 1000000000000
for i in range(n):
	(a, b) = [int(a) for a in input().strip().split(' ')]
	min_cost = min(min_cost, m * a / b)
print(min_cost)


first_line = [int(i) for i in input().split()]
n = first_line[0]
m = first_line[1]
smallest_number = 1000000
a = []
b = []
c = []
for i in range(n):
	second_line = [int(i) for i in input().split()]
	a.append(second_line[0])
	b.append(second_line[1])
	c.append(a[i] / b[i])
for i in range(n):
	if c[i] < smallest_number:
		smallest_number = c[i]
x = smallest_number * m
print(x)


(n, m) = [int(i) for i in input().split()]
mini = -1
for i in range(n):
	(a, b) = [int(i) for i in input().split()]
	if a / b < mini or mini == -1:
		mini = a / b
print(mini * m)


(n, m) = [int(i) for i in input().split()]
ans = 10 ** 9
for i in range(n):
	(a1, a2) = [int(i) for i in input().split()]
	ans = min(ans, a1 * m / a2)
print(ans)


(n, m) = input().split()
ans = []
for x in range(int(n)):
	(a, b) = input().split()
	ans.append(int(a) / int(b))
ans = sorted(ans)
print(round(ans[0] * int(m), 8))


(n, m) = map(int, input().split(' '))
best = 10000000000
for i in range(n):
	(a, b) = map(int, input().split(' '))
	x = m * 1.0 * a / b
	best = min(best, x)
print(best)


(n, m) = list(map(int, input().split()))
r = float('inf')
for _ in range(n):
	(x, y) = list(map(int, input().split()))
	r = min(r, m * x / y)
print(r)


pointer = 0
lst = [0, 0]
(n, m) = list(map(int, input().split()))
for i in range(n):
	(a, b) = list(map(int, input().split()))
	if pointer == 0:
		(lst[0], lst[1]) = (a, b)
	pointer += 1
	if m * lst[0] / lst[1] > m * a / b:
		(lst[0], lst[1]) = (a, b)
print(m * lst[0] / lst[1])


(a, b) = map(int, input().split())
min = 100
for i in range(0, a):
	(x, y) = map(int, input().split())
	z = x / y
	if min > z:
		min = z
print(min * b)


import sys
(n, m) = map(int, sys.stdin.readline().split())
mina = 1000000
for i in range(n):
	(a, b) = map(int, sys.stdin.readline().split())
	if a / b * m < mina:
		mina = a / b * m
print(mina)


(n, m) = map(int, input().split())
ans = 10 ** 10
for i in range(n):
	(a, b) = map(int, input().split())
	ans = min(ans, a / b)
print(round(ans * m, 8))


(n, m) = map(int, input().split())
(a, b) = map(int, input().split())
top = m * a / float(b)
for i in range(n - 1):
	(a, b) = map(int, input().split())
	t2 = m * a / float(b)
	top = t2 if t2 < top else top
print(top)


x = input()
xx = x.split()
n = int(xx[0])
m = int(xx[1])
j = 1e309
for ikv in range(0, n):
	x = input()
	xx = x.split()
	a = int(xx[0])
	b = int(xx[1])
	f = a / b
	if f < j:
		j = f
print(j * m)


import sys
input = sys.stdin.readline
ins = lambda : input().rstrip()
ini = lambda : int(input().rstrip())
inm = lambda : map(int, input().rstrip().split())
inl = lambda : list(map(int, input().split()))
out = lambda x, s='\n': print(s.join(map(str, x)))
(n, m) = inm()
ans = 1000000000.0
for _ in range(n):
	(a, b) = inm()
	ans = min(ans, m * a / b)
print(ans)


a = list(map(int, input().split()))
c = []
for i in range(a[0]):
	b = list(map(int, input().split()))
	c.append(a[1] * b[0] / b[1])
print(min(c))


(n, m) = map(int, input().split())
w = 101
for i in range(n):
	(a, b) = map(int, input().split())
	x = a / b
	if x < w:
		w = x
print(w * m)


(n, m) = map(int, input().split())
k = 10000
for i in range(n):
	(a, b) = map(int, input().split())
	c = a / b
	if k > c:
		k = c
print(m * k)


(n, m) = map(int, input().split())
asd = 10 ** 9
for i in range(n):
	(a, b) = map(int, input().split())
	if a / b < asd:
		asd = a / b
print(asd * m)


(n, m) = map(int, input().split())
(a, b) = map(int, input().split())
ma = a / b
for f in range(n - 1):
	(aa, bb) = map(int, input().split())
	if aa / bb < ma:
		ma = aa / bb
print(ma * m)


(n, m) = map(int, input().split())
g = []
for i in range(n):
	(a, b) = map(int, input().split())
	g.append((a / b, b))
g.sort(key=lambda x: x[0])
print(g[0][0] * m)


minimum = 100
(n, m) = [int(i) for i in input().split(' ')]
for i in range(n):
	(x, y) = [int(a) for a in input().split(' ')]
	b = x / y
	if b < minimum:
		minimum = b
print(minimum * m)


(n, m) = map(int, input().split())
l = list()
while n:
	(a, b) = map(int, input().split())
	l.append(a / b)
	n -= 1
print(min(l) * m)


(n, m) = map(int, input().split())
s = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if i == 0:
		s = a / b
	elif a / b < s:
		s = a / b
print(s * m)


(n, m) = list(map(int, input().split()))
best = 100000
for i in range(n):
	(a, b) = list(map(int, input().split()))
	s = a / b
	best = min(best, s)
print(best * m)


(n, m) = [int(i) for i in input().split()]
ans = 100000.0
for i in range(n):
	(a, b) = [int(i) for i in input().split()]
	x = m * (a / b)
	if x < ans:
		ans = x
print(ans)


(n, m) = list(map(int, input().strip().split()))
best = 10 ** 9
for _ in range(n):
	(a, b) = list(map(int, input().strip().split()))
	best = min(best, m * (a / b))
print(best)


(n, m) = map(int, input().split())
new = []
for items in range(n):
	(a, b) = map(int, input().split())
	new.append(m / b * a)
print(min(new))


import sys, math, os.path
FILE_INPUT = 'a.in'
DEBUG = os.path.isfile(FILE_INPUT)
if DEBUG:
	sys.stdin = open(FILE_INPUT)

def ni():
	return int(input())

def nvi():
	return map(int, input().split(' '))

def nia():
	return list(map(int, input().split()))

def log(x):
	if DEBUG:
		print(x)
(n, m) = nvi()
mina = 1000
minb = 1
for i in range(n):
	(a, b) = nvi()
	if a * minb < b * mina:
		(mina, minb) = (a, b)
print(m * mina / minb)


(n, m) = [int(i) for i in input().split()]
y = 100000000
for i in range(n):
	(a, b) = [int(i) for i in input().split()]
	x = a / b * m
	if x < y:
		y = x
print(y)


(n, m) = map(int, input().split())
d = 0
k = 10 ** 9
for i in range(n):
	(a, b) = map(float, input().split())
	d = a / b * m
	if d < k:
		k = d
print(k)


(n, m) = map(int, input().split())
s = None
for i in range(0, n):
	(cost, quant) = map(int, input().split())
	s = cost / quant if s is None or cost / quant < s else s
print(s * m)


(n, m) = map(int, input().split())
l2 = []
for i in range(n):
	l1 = list(map(int, input().split()))
	a = l1[0] / l1[1]
	l2.append(a)
print('{0:.8f}'.format(min(l2) * m))


(n, m) = map(int, input().split())
c = []
for i in range(n):
	(a, b) = map(int, input().split())
	c.append(a / b)
k = str(min(c) * m)
k = k.split('.')
if len(k[1]) < 8:
	print(k[0] + '.' + k[1] + '0' * (8 - len(k[1])))
else:
	k = k[0] + '.' + k[-1]
	print(k[:-8])


m = 1000000000000000.0
(n, t) = map(int, input().split())
for i in range(n):
	(a, b) = map(int, input().split())
	m = min(m, a * t / b)
print(m)


(markets, apples) = input().split()
(x, y) = input().split()
cost = int(x) / int(y)
for i in range(int(markets) - 1):
	(x, y) = input().split()
	if int(x) / int(y) < cost:
		cost = int(x) / int(y)
print(cost * int(apples))


(n, m) = [int(i) for i in input().split()]
c = []
for i in range(n):
	(a, b) = [int(i) for i in input().split()]
	c.append(a / b)
print(min(c) * m)


import atexit
import io
import sys
import os
from bisect import *
from collections import *
from fractions import gcd
from fractions import Fraction as fr_
from itertools import *
import math
inf = float('inf')
inf_neg = float('-inf')
range_5 = int(100000.0 + 1)
range_6 = int(1000000.0 + 1)
range_7 = int(10000000.0 + 1)
range_8 = int(100000000.0 + 1)
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())

def main():
	(n, m) = map(int, input().split())
	ll = []
	for _ in range(n):
		(a, b) = map(int, input().split())
		ll.append(a / b)
	print(min(ll) * m)
main()


(n, m) = list(map(int, input().split()))
(a, b) = list(map(int, input().split()))
ans = m * (a / b)
for i in range(1, n):
	(a, b) = list(map(int, input().split()))
	ans = min(ans, m * (a / b))
print('%.7f' % ans)


(n, m) = map(int, input().split())
lst = []
for i in range(n):
	(x, y) = map(int, input().split())
	lst.append(x / y * m)
print('{}'.format(min(lst)))


(n, m) = map(int, input().split())
mx = 100000000000.0
for i in range(n):
	(a, b) = map(int, input().split())
	mx = min(mx, m * a / b)
print(mx)


R = lambda : map(int, input().split())
(n, m) = R()
res = 10 ** 19
for _ in range(n):
	(a, b) = R()
	res = min(res, m * a / b)
print(res)


(n, m) = [int(x) for x in input().split()]
MIN = 1000000.0
for wjaiodnjaodoasmc in range(n):
	(a, b) = [int(x) for x in input().split()]
	if a / b < MIN:
		MIN = a / b
print(MIN * m)


(k, v) = map(int, input().split())
result = []
for i in range(k):
	(u, m) = map(int, input().split())
	result.append(u / m)
minPrice = min(result)
print(minPrice * v)


(n, m) = map(int, input().split(' '))
(a, b) = map(int, input().split(' '))
min_price = a / b
for i in range(n - 1):
	(a, b) = map(int, input().split(' '))
	if a / b < min_price:
		min_price = a / b
print(min_price * m)


from sys import stdin

def ii():
	return int(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline()
(n, m) = mi()
x = 100
for _ in range(n):
	(a, b) = mi()
	x = min(x, a / b)
print(x * m)


(n, m) = [int(s) for s in input().split(' ')]
min_cost = float('inf')
for i in range(n):
	(a, b) = [int(s) for s in input().split(' ')]
	min_cost = min(min_cost, m * a / b)
print(min_cost)


(n, m) = input().split()
(n, m) = (int(n), int(m))
li = []
for i in range(n):
	(a, b) = input().split()
	(a, b) = (int(a), int(b))
	out = a * m / b
	li.append(out)
print(round(min(li), 8))


(a, b) = map(int, input().split())
c = 0
for i in range(a):
	(x, y) = map(int, input().split())
	if i == 0:
		c = x / y
	else:
		c = min(c, x / y)
print('{0:.8f}'.format(c * b))


(n, m) = map(int, input().split())
ms = 1000000000
for i in range(n):
	(a, b) = map(int, input().split())
	ms = min(ms, a / b)
print('%.8f' % (ms * m))


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
(n, m) = get_int_list()
mi = 10 ** 10
for i in range(n):
	(a, b) = get_int_list()
	price = a / b * m
	mi = min(mi, price)
print('{:.8f}'.format(mi))


(n, m) = map(int, input().split())
(p, q) = map(int, input().split())
result = p / q * m
for i in range(n - 1):
	(p, q) = map(int, input().split())
	newResult = p / q * m
	if newResult < result:
		result = newResult
print(round(result, 8))


(n, m) = map(int, input().split())
s = 10000000
for _ in range(n):
	(a, b) = map(int, input().split())
	s = min(s, m * a / b)
print(s)


(n, m) = list(map(int, input().split()))
low = 1000000000000000000000000
for i in range(n):
	(a, b) = list(map(int, input().split()))
	if a / b * m < low:
		low = a / b * m
print(low)


(n, m) = map(int, input().split())
a = [10 * 100, 1]
for i in range(n):
	x = list(map(int, input().split()))
	if x[0] / x[1] < a[0] / a[1]:
		a = x
print(a[0] * m / a[1])


(n, m) = [int(x) for x in input().split()]
c = [[int(x) for x in input().split()] for _ in range(n)]
print(min([m * cc[0] / cc[1] for cc in c]))


a = input().split()
n = int(a[0])
m = int(a[1])
ratio = 100000
for value in range(n):
	line = input().split()
	first = int(line[0])
	second = int(line[1])
	if ratio > first / second:
		ratio = first / second
print(ratio * m)


l = [int(f) for f in input().split()]
price = float('inf')
for i in range(l[0]):
	a = [int(c) for c in input().split()]
	if a[0] / a[1] < price:
		price = a[0] / a[1]
print(price * l[1])


(n, m) = map(int, input().split())
li = []
for i in range(n):
	(a, b) = map(int, input().split())
	li.append(a / b * m)
li.sort()
print(li[0])


(n, m) = map(int, input().split())
ans = 1000000
for i in range(n):
	(a, b) = map(int, input().split())
	if a / b < ans:
		ans = a / b
print(ans * m)


(n, m) = map(int, input().split())
(m1, m2) = map(int, input().split())
for i in range(n - 1):
	(a, b) = map(int, input().split())
	if m1 / m2 > a / b:
		(m1, m2) = (a, b)
print(m1 * m / m2)


(n, m) = map(int, input().strip().split(' '))
mini = 10000000
for i in range(n):
	(p, q) = map(int, input().strip().split(' '))
	if mini > p / q:
		mini = p / q
print(m * mini)


(mar, pri) = map(int, input().split())
no_price = 10000
for i in range(mar):
	(price, km) = map(int, input().split())
	if no_price > price / km:
		no_price = price / km
print(format(no_price * pri, '.7f'))


a = list(map(int, input().split()))
min = 100000
for i in range(a[0]):
	b = list(map(int, input().split()))
	s = b[0] / b[1]
	if s < min:
		min = s
print(min * a[1])


(n, m) = [int(x) for x in input().split()]
minSum = 1000000.0
for i in range(n):
	(a, b) = [int(x) for x in input().split()]
	minSum = min(minSum, a * m / b)
print(minSum)


import sys
(n, m) = input().split()
n = int(n)
m = int(m)
minf = float(1000)
for i in range(0, n):
	(x, y) = input().split()
	x = float(x)
	y = float(y)
	if x / y < minf:
		minf = x / y
print(m * minf)


(supermarkets, kilos) = map(int, input().split())
minimal = None
for i in range(supermarkets):
	(mprice, mkilos) = map(int, input().split())
	total = mprice / mkilos
	if i and total < minimal:
		minimal = total
	elif not i:
		minimal = total
print(minimal * kilos)


import math
(n, m) = map(int, input().split())
minm = pow(10, 9)
for i in range(n):
	(x, y) = map(int, input().split())
	minm = min(minm, x / y)
print('{0:.8f}'.format(m * minm))


s = input().split()
n = int(s[0])
m = float(s[1])
mincost = 1e+16
while n:
	n -= 1
	s = input().split()
	a = float(s[0])
	b = float(s[1])
	curr = a / b * m
	if mincost > curr:
		mincost = curr
print(mincost)


(n, m) = map(int, input().split())
min = 1000000
for i in range(0, n):
	(a, b) = map(float, input().split())
	if a / b < min:
		min = a / b
print('%.9f' % (min * m))


import sys
(n, m) = map(int, input().split())
min = sys.maxsize
for i in range(n):
	(a, b) = map(float, input().split())
	if min > a / b:
		min = a / b
print(min * m)


z = list(map(int, input().split()))
arr = []
for i in range(z[0]):
	y = list(map(int, input().split()))
	arr.append(y[0] / y[1])
print('%.8f' % (min(arr) * z[1]))


(n, m) = map(int, input().split())
v = []
for i in range(n):
	(a, b) = map(int, input().split())
	z = a / b
	v.append(z)
print(min(v) * m)


import math
(n, m) = map(int, input().split())
nok = 1
a = []
b = []
for i in range(n):
	(s1, s2) = map(int, input().split())
	a.append(s1)
	b.append(s2)
	nok = nok * s2 // math.gcd(nok, s2)
for i in range(n):
	a[i] *= nok // b[i]
print(min(a) / nok * m)


M = [int(j) for j in input().split(' ')]
L = []
mi = float('inf')
for i in range(M[0]):
	L.append([int(j) for j in input().split(' ')])
	if mi > L[i][0] / L[i][1]:
		mi = L[i][0] / L[i][1]
print(mi * M[1])


line = input()
(nn, mm) = line.split()
n = int(nn)
m = int(mm)
min = -1
for i in range(n):
	line = input()
	(aa, bb) = line.split()
	a = float(aa)
	b = float(bb)
	price = a / b
	if min < 0:
		min = price
	if price < min:
		min = price
ans = min * m
print(ans)


prices = []
(n, m) = input().split()
n = int(n)
m = int(m)
for x in range(0, n):
	(a, b) = input().split()
	price = int(a) / int(b)
	prices.append(price)
lowest = min(prices)
finalPrice = lowest * m
print(round(finalPrice, 8))