#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;

struct bechua {
    int b, h, w, d;
};

bechua a[N];
int n, v;
double eps = 0.001;

bool check(double x) {
    double sum = 0;
    for (int i = 1; i <= n; ++i) {
        if (a[i].b < x)
            sum += min((x - a[i].b), (double)a[i].h) * a[i].w * a[i].d;
    }
    return sum >= v;
}

void solve() {
    double res;
    double dau = 0, cuoi = 1e6 + 4e4;
    while (dau <= cuoi) {
        double giua = (dau + cuoi) / 2;
        if (check(giua)) {
            res = giua;
            cuoi = giua - eps;
        } else {
            dau = giua + eps;
        }
    }
    cout << fixed << setprecision(2) << res;
}

int main() {
    cin >> n >> v;
    for (int i = 1; i <= n; i++) {

        cin >> a[i].b >> a[i].h >> a[i].w >> a[i].d;
    }
    solve();
}
