题目描述
Problem Background
This problem's score is set according to the original COCI, with a full score of $50$.
Problem Description
National Supermarket Chain (NSC) likes to boast that their mortadella is the cheapest nationwide.
In fact, if a customer finds a cheaper mortadella at another chain, NSC will compensate the difference.
Matej and Filip have decided to take on this challenge. They will visit $N$ different stores to find not only mortadella cheaper than NSC's but also the cheapest in the market. If they succeed, they can buy the cheapest mortadella at the NSC branch near their school.
NSC hopes that no one can find a cheaper mortadella because all supermarkets (including NSC) represent the price of mortadella in a complex way: $X$ dollars for $Y$ grams of mortadella.
Write a program that, given the prices of mortadella at NSC and the other $N$ stores, calculates the price Matej and Filip must pay for $1000$ grams of mortadella at the NSC near their school.
Input Format
The first line contains two positive integers $X_{\textrm{NSC}}\ (1\le X_{\textrm{NSC}} \le 100)$ and $Y_{\textrm{NSC}}\ (1\le Y_{\textrm{NSC}} \le 10^3)$, representing the price of $Y_{\textrm{NSC}}$ grams of mortadella at the NSC.
The second line contains a positive integer $N\ (1\le N\le 100)$, representing the number of stores (excluding NSC).
The next $N$ lines each contain two positive integers $X_i, Y_i\ (X_i\le 100, Y_i\le 10^3)$, representing the price of $Y_i$ grams of mortadella at the $i$-th store.
Output Format
Output a single line containing a real number, representing the result, rounded to two decimal places.
Sample Input and Output
Sample Input #1
5 100
3
4 100
3 100
7 100
Sample Output #1
30.00
Sample Input #2
13 6
5
56 679
35 120
99 999
56 73
37 532
Sample Output #2
69.55
Sample Input #3
100 5
3
99 8
65 14
78 10
Sample Output #3
4642.86
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分