#include using namespace std; #define rep(i, n) for( int i = 0; i < n; i++ ) using ll = long long; int main() { int N, X; cin >> N >> X; vector a( N ), b( N); rep(i, N) { cin >> a[i] >> b[i]; a[i]--; } vector ans( X ); rep(x, X) { rep(i, N) { ans[x] = max(ans[x], max(0, b[i] - abs(x - a[i]))); } } rep(i, X) cout << ans[i] << " "; cout << endl; }