Problem: The New Year celebrations in Berland last n days. Only this year the winter is snowless, that’s why the winter celebrations’ organizers should buy artificial snow. There are m snow selling companies in Berland. Every day the i-th company produces wi cubic meters of snow. Next day the snow thaws and the company has to produce wi cubic meters of snow again. During the celebration new year discounts are on, that’s why the snow cost decreases every day. It is known that on the first day the total cost of all the snow produced by the i-th company is equal to ci bourles. Every day this total cost decreases by ai bourles, i.e. on the second day it is equal to ci - ai,and on the third day — to ci - 2ai, and so on. It is known that for one company the cost of the snow produced by it does not get negative or equal to zero. You have to organize the snow purchase so as to buy every day exactly W snow cubic meters. At that it is not necessary to buy from any company all the snow produced by it. If you buy ni cubic meters of snow (0 ≤ ni ≤ wi, the number ni is not necessarily integer!) from the i-th company at one of the days when the cost of its snow is equal to si, then its price will total to <image> bourles. During one day one can buy the snow from several companies. In different days one can buy the snow from different companies. It is required to make the purchases so as to spend as little money as possible. It is guaranteed that the snow produced by the companies will be enough.

Input

The first line contains integers n, m and W (1 ≤ n ≤ 100, 1 ≤ m ≤ 500000, 1 ≤ W ≤ 109) which represent the number of days, the number of companies and the amount of snow that needs to be purchased on every one of the n days. The second line contains m integers wi. The third line contains m integers ci. The fourth line contains m integers ai. All the numbers are strictly positive and do not exceed 109. For all the i the inequation ci - (n - 1)ai > 0 holds true. 

Output

Print a single number — the answer to the given problem. Print the answer in the format with the decimal point (even if the answer is integer, it must contain the decimal point), without "e" and without leading zeroes. The answer should differ with the right one by no more than 10 - 9.

Examples

Input

2 3 10
4 4 4
5 5 8
1 2 5


Output

22.000000000000000


Input

100 2 1000000000
999999998 999999999
1000000000 1000000000
1 1


Output

99999995149.999995249999991

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:200000000")
using namespace std;
int ri() {
  int x;
  scanf("%d", &x);
  return x;
}
long long rll() {
  long long x;
  scanf("%lld", &x);
  return x;
}
struct adouble {
  long long cel;
  long double ost;
  adouble() {
    cel = 0;
    ost = 0.0;
  }
};
pair<long double, int> mas[500500];
int a[500500];
int c[500500];
int w[500500];
adouble operator+(const adouble &a, const adouble &b) {
  adouble res;
  res.cel = a.cel + b.cel;
  res.ost = a.ost + b.ost;
  while (res.ost >= (long double)1.0) res.cel++, res.ost -= (long double)1.0;
  return res;
}
adouble solve(int l, int r, int ost) {
  adouble res;
  if (l + 1 == r) {
    long double d = mas[l].first * (long double)ost;
    long long cel = (d + (long double)1e-12);
    res.cel += cel;
    d -= (long double)cel;
    res.ost += d;
    while (res.ost >= (long double)1.0) res.ost -= (long double)1.0;
    return res;
  }
  int mid = l + (rand() * 131 + rand()) % (r - l + 1);
  long double val = mas[mid].first;
  int idx = mas[mid].second;
  int p = l;
  for (int j = l + 1; j < r; j++) {
    if (j < p) continue;
    if (mas[j].first + 1e-12 < val ||
        fabs(mas[j].first - val) < 1e-12 && mas[j].second <= idx) {
      swap(mas[j], mas[p]);
      p++;
      j--;
    }
  }
  p--;
  int ccc = 0;
  bool le = false;
  for (int i = l; i <= p; i++) {
    ccc += w[mas[i].second];
    if (ccc >= ost) {
      le = true;
      break;
    }
  }
  if (le) {
    res = res + solve(l, p + 1, ost);
  } else {
    for (int i = l; i <= p; i++) {
      ost -= w[mas[i].second];
      res.cel += c[mas[i].second];
    }
    res = res + solve(p + 1, r, ost);
  }
  return res;
}
int main() {
  int n, m, W;
  scanf("%d %d %d", &n, &m, &W);
  for (int i = 0; i < m; i++) scanf("%d", &w[i]);
  for (int i = 0; i < m; i++) scanf("%d", &c[i]);
  for (int i = 0; i < m; i++) scanf("%d", &a[i]);
  for (int i = 0; i < m; i++) {
    mas[i].first = (long double)c[i] / (long double)w[i];
    mas[i].second = i;
  }
  random_shuffle(mas, mas + m);
  adouble res;
  for (int i = 0; i < n; i++) {
    if (i != 0) {
      for (int j = 0; j < m; j++) {
        c[mas[j].second] -= a[mas[j].second];
        mas[j].first =
            (long double)c[mas[j].second] / (long double)w[mas[j].second];
      }
    }
    random_shuffle(mas, mas + m);
    res = res + solve(0, m, W);
  }
  if (res.ost < 0.0) res.ost = 1e-15;
  res.ost *= 1e12;
  printf("%lld.%012.0lf\n", res.cel, (double)res.ost);
  return 0;
}