Seongwon is a guest at an algorithm camp and makes candy for the participants. There are N participants, numbered 0 to N−1.
Participant i holds a basket with a capacity of Ci liters and wants to receive Wi grams of candy.
Seongwon fills every basket to its capacity, so participant i receives exactly Ci liters of candy. He can make only one kind of candy, so a single density d (grams per liter) applies to all of it. He may choose any positive real number for d.
Once the density is d, participant i actually receives d×Ci grams. To satisfy as many participants as possible, Seongwon picks the d that minimizes the total difference between the requested weight and the received weight:
∑i=0N−1∣Wi−d×Ci∣
Write a program that computes this minimum.
Input
The first line contains the number of participants N (1≤N≤50).
The second line contains C0,C1,…,CN−1 and the third line contains W0,W1,…,WN−1, separated by spaces. (1≤Ci,Wi≤1000000)
Output
Print the minimum total difference on one line as a reduced fraction.
The minimum is always a rational number. Write it as p/q, where p is a nonnegative integer, q is a positive integer, and gcd(p,q)=1. If q=1, print only p; otherwise print it in the form p/q. A decimal or an approximate value is not accepted.