#include #include #include using namespace std ; typedef long long int64 ; typedef pair pt ; int main(int argc, char *argv[]) { int N, W, H, R ; cin >> N >> R >> W >> H ; vector a ; for (int i=0; i> x >> y ; a.push_back(make_pair(x*R+y, y-x*R)) ; } sort(a.begin(), a.end()) ; vector start ; for (int i=0; i::iterator ind = upper_bound(start.begin(), start.end(), y) ; if (ind == start.end()) start.push_back(y) ; else *ind = y ; } cout << start.size() << endl ; }