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>
using namespace std;
template <class T>
void show(T a, int n) {
  for (int i = 0; i < n; ++i) cout << a[i] << ' ';
  cout << endl;
}
template <class T>
void show(T a, int r, int l) {
  for (int i = 0; i < r; ++i) show(a[i], l);
  cout << endl;
}
const int N = 128;
const int M = 500010;
const int oo = 10000 * 10000 * 10;
struct Node {
  double p;
  int w;
  int c;
  int a;
} com[M];
int cmp(Node a, Node b) {
  if (a.p - b.p < 0) return -1;
  if (a.p - b.p > 0) return 1;
  return 0;
}
int n, m;
int w;
bool print = false;
void qsort(int lf, int ri, int w) {
  int i, j, k;
  if (w <= 0 || lf >= ri) return;
  i = lf, j = ri;
  double pivot = (com[i].p + com[j].p) * 0.5;
  while (i <= j) {
    while (i <= ri && com[i].p < pivot) ++i;
    while (j >= lf && com[j].p > pivot) --j;
    if (i <= j) {
      swap(com[i], com[j]);
      ++i, --j;
    }
  }
  long long sum = 0;
  for (k = lf; k < i; ++k) {
    sum += com[k].w;
  }
  if (sum >= w) {
    qsort(lf, j, w);
  } else if (i != lf) {
    qsort(i, ri, w - sum);
  }
}
void show() {
  int i;
  for (i = 0; i < m; ++i) {
    printf("%0.3f %d %d %d\n", com[i].p, com[i].w, com[i].c, com[i].a);
  }
}
char buf[100];
int main() {
  int i, j, cas = 0;
  scanf("%d %d %d", &n, &m, &w);
  for (i = 0; i < m; ++i) scanf("%d", &com[i].w);
  for (i = 0; i < m; ++i) scanf("%d", &com[i].c);
  for (i = 0; i < m; ++i) scanf("%d", &com[i].a);
  for (i = 0; i < m; ++i) com[i].p = (double)com[i].c / com[i].w;
  long long ip = 0;
  double dp = 0.0;
  for (i = 0; i < n; ++i) {
    if (i == 1) print = true;
    qsort(0, m - 1, w);
    int res = w;
    for (j = 0; j < m; ++j) {
      if (com[j].w <= res) {
        res -= com[j].w;
        ip += com[j].c - i * com[j].a;
      } else {
        long long tmp = (long long)res * (com[j].c - i * com[j].a);
        ip += tmp / com[j].w;
        dp += (double)(tmp % com[j].w) / com[j].w;
        break;
      }
    }
    for (j = 0; j < m; ++j) com[j].p -= (double)com[j].a / com[j].w;
  }
  int tmp = (int)dp;
  ip += tmp;
  dp -= tmp;
  sprintf(buf, "%.15f\n", dp);
  printf("%lld", ip);
  i = 0;
  while (buf[i] != '.') ++i;
  while (buf[i]) printf("%c", buf[i++]);
  return 0;
}