#include //#include using namespace std; //using namespace atcoder; using ll = long long; const ll mod = 1000000007; //const ll mod = 998244353; int n, x, a[1009], b[1009],ans[1009]; int main() { cin >> n >> x; for (int i = 1; i <= n; i++)cin >> a[i] >> b[i]; for (int i = 1; i <= x; i++) { ans[i] = 0; for (int j = 1; j <= n; j++) { ans[i] = max(ans[i], b[j] - abs(i - a[j])); } cout << ans[i] <<" "; } cout << endl; }