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>
int ww[1000000];
int c[1000000];
int a[1000000];
struct P {
  int w;
  int c;
};
P p[1000000];
int cmp(P a, P b) {
  if ((long long)a.c * b.w > (long long)b.c * a.w) return -1;
  if ((long long)a.c * b.w < (long long)b.c * a.w) return 1;
  return 0;
}
class Double {
  long long a, b;

 public:
  Double() {
    a = 0;
    b = 0;
  }
  Double(int p, int q, int t) {
    a = (long long)p * t / q;
    b = (long long)((double)((long long)(p * 1ll * t) % q) / q *
                    1000000000000000000);
  }
  Double operator=(Double c) {
    a = c.a;
    b = c.b;
    return *this;
  }
  Double operator+(Double c) {
    Double t;
    t = *this;
    t += c;
    return t;
  }
  Double operator*(int c) {
    Double t;
    t = *this;
    t *= c;
    return t;
  }
  Double operator*=(int c) {
    a *= c;
    long long t1 = b / 1000000000;
    long long t2 = b % 1000000000;
    a += t1 * c / 1000000000;
    b = t1 * c % 1000000000 * 1000000000;
    b += t2 * c;
  }
  Double operator+=(Double c) {
    a += c.a;
    b += c.b;
    a += b / 1000000000000000000;
    b %= 1000000000000000000;
    return *this;
  }
  void print() {
    if (1000000000000000000 - b < 1000000000) b = 0, a++;
    printf("%lld.", a);
    long long t = 1000000000000000000 / 10;
    for (int i = 0; i < 15; i++) {
      printf("%d", (int)(b / t));
      b %= t;
      t /= 10;
    }
  }
  Double operator+=(int c) {
    a += c;
    return *this;
  }
};
Double calc(int a, int b, int W) {
  P etalon = p[(a + b) / 2];
  if (a == b) {
    if (W == 0)
      return Double();
    else {
      Double t(W, p[a].w, p[a].c);
      return t;
    }
  }
  int ai = a;
  int bi = b;
  while (ai <= bi) {
    while (cmp(p[ai], etalon) == 1) ai++;
    while (cmp(p[bi], etalon) == -1) bi--;
    if (ai <= bi) {
      P t = p[ai];
      p[ai] = p[bi];
      p[bi] = t;
      ai++;
      bi--;
    }
  }
  long long sum = 0;
  Double price;
  int c = bi;
  if (c < a) c = a;
  for (int i = a; i <= c; i++) {
    sum += p[i].w;
    price += p[i].c;
  }
  if (sum <= W) {
    price += calc(c + 1, b, W - sum);
    return price;
  }
  if (sum > W) {
    price = calc(a, c, W);
  }
  return price;
}
int main() {
  int n, m, w;
  scanf("%d%d%d", &n, &m, &w);
  for (int i = 0; i < m; i++) scanf("%d", &ww[i]);
  for (int i = 0; i < m; i++) scanf("%d", &c[i]);
  for (int i = 0; i < m; i++) scanf("%d", &a[i]);
  Double rez;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      p[j].c = c[j] - a[j] * i;
      p[j].w = ww[j];
    }
    rez += calc(0, m - 1, w);
  }
  rez.print();
}