#include <bits/stdc++.h>

using namespace std;

const int MOD = 1e9 + 7;

struct Median {
  multiset<int> L;
  multiset<int> R;
  long long sL = 0;
  long long sR = 0;
  void Insert(int x) {
    if (!L.empty() && *prev(L.end()) <= x) {
      R.insert(x);
      sR += x;
    } else {
      L.insert(x);
      sL += x;
    }
    /*while (L.size() > R.size() + 1) {
      auto it = prev(L.end());
      sL -= *it;
      sR += *it;
      R.insert(*it);
      L.erase(it);
    }
    while (R.size() > L.size() + 1) {
      auto it = R.begin();
      sR -= *it;
      sL += *it;
      L.insert(*it);
      R.erase(it);
    }*/
  }
  long long Solve() {
    long long med = *prev(L.end());
    long long S = 0;
    for (auto& p : L) {
      S += abs(med - p);
    }
    for (auto& p : R) {
      S += abs(med - p);
    }
    return S;
  }
};

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int mn_x = 1e9;
  int mn_y = 1e9;
  int mx_x = 0;
  int mx_y = 0;
  long long sx = 0;
  long long sy = 0;
  vector<long long> f(4);
  for (int t = 1; t <= n; t++) {
    int x, y;
    cin >> x >> y;
    mn_x = min(mn_x, x);
    mn_y = min(mn_y, y);
    mx_x = max(mx_x, x);
    mx_y = max(mx_y, y);
    sx += x;
    sy += y;
    f[0] += x * 1LL * y;
    f[1] -= x * 1LL * y;
    f[2] -= x * 1LL * y;
    f[3] += x * 1LL * y;
    long long ans = 0;
    ans = max(ans, f[0] - mn_y * 1LL * sx - mn_x * 1LL * sy + mn_x * 1LL * mn_y * 1LL * t);
    ans = max(ans, f[1] + mx_x * 1LL * sy + sx * 1LL * mn_y - mx_x * 1LL * mn_y * 1LL * t);
    ans = max(ans, f[2] + mx_y * 1LL * sx + sy * 1LL * mn_x - mx_y * 1LL * mn_x * 1LL * t);
    ans = max(ans, f[3] + mx_x * 1LL * mx_y * 1LL * t - mx_x * 1LL * sy - sx * 1LL * mx_y);
    cout << ans << '\n';
  }
  return 0;
}