#include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; typedef pair Pii; const ll mod = 998244353; int main() { cin.tie(0); ios::sync_with_stdio(false); int n, x; cin >> n >> x; vector ab(n); for (auto &[a, b]: ab) cin >> a >> b; vector ans; for (int i = 1; i <= x; i++) { int light_level = 0; for (auto &[a, b]: ab) { light_level = max(light_level, b - abs(a - i)); } ans.push_back(light_level); } for (auto &a: ans) cout << a << " "; cout << endl; return 0; }