#include <bits/stdc++.h>
using namespace std;
int dcmp(double p) {
  if (abs(p) < 1e-10) return 0;
  return p > 1e-10 ? 1 : -1;
}
int n, m;
double area[310];
int y[310][310];
struct Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
  friend Point operator-(Point a, Point b) {
    return Point(a.x - b.x, a.y - b.y);
  }
  friend Point operator+(Point a, Point b) {
    return Point(a.x + b.x, a.y + b.y);
  }
  friend Point operator*(Point a, double p) { return Point(a.x * p, a.y * p); }
};
double Cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
Point poly[310 * 2];
void read() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; ++i)
    for (int j = 0; j <= m; ++j) scanf("%d", &y[i][j]);
}
Point getinter(Point a, Point b, Point c, Point d) {
  Point v1 = b - a, v2 = d - c, v3 = a - c;
  double t = Cross(v2, v3) / Cross(v1, v2);
  return a + v1 * t;
}
bool OnSegment(Point p, Point a, Point b) {
  return dcmp(p.x - a.x) * dcmp(p.x - b.x) <= 0 &&
         dcmp(p.y - a.y) * dcmp(p.y - b.y) <= 0;
}
void work() {
  static Point tmp[310 * 2];
  for (int i = 0; i < m; ++i) {
    int tot = 4;
    poly[1] = Point(i, 0), poly[2] = Point(i + 1, 0),
    poly[3] = Point(i + 1, 1000), poly[4] = Point(i, 1000);
    for (int j = 1; j <= n; ++j) {
      Point a = Point(i + 1, y[j][i + 1]), b = Point(i, y[j][i]);
      int cnt = 0;
      for (int k = 1; k <= tot; ++k) {
        Point c = poly[k], d = poly[k % tot + 1];
        if (dcmp(Cross(c - a, b - a)) < 0) tmp[++cnt] = c;
        if (dcmp(Cross(b - a, d - c))) {
          Point p = getinter(a, b, c, d);
          if (OnSegment(p, c, d)) tmp[++cnt] = p;
        }
      }
      for (int k = 1; k <= cnt; ++k) area[j] += Cross(tmp[k], tmp[k % cnt + 1]);
      swap(a, b), cnt = 0;
      for (int k = 1; k <= tot; ++k) {
        Point c = poly[k], d = poly[k % tot + 1];
        if (dcmp(Cross(c - a, b - a)) < 0) tmp[++cnt] = c;
        if (dcmp(Cross(b - a, d - c))) {
          Point p = getinter(a, b, c, d);
          if (OnSegment(p, c, d)) tmp[++cnt] = p;
        }
      }
      tot = cnt;
      for (int k = 1; k <= tot; ++k) poly[k] = tmp[k];
    }
  }
}
void print() {
  for (int i = 1; i <= n; ++i) printf("%.10f\n", area[i] / 2);
}
int main() {
  read();
  work();
  print();
  return 0;
}
