12
-6712 6
2375 73
4643 197
-5660 215
-378 223
2228 307
3305 340
3449 468
-4389 707
-7161 729
-1838 921
-1655 985
730
 5
1 5
6 7
17127 17
17072 42
17042 77
3
 7
-976754 20479
79929143 911181
9598220 82517
-51609349 810257
67416551 266544
-14170975 307690
-15476178 491195
352
 22
-5301 602
-1400 194
-8512 987
-282 962
6484 494
9091 523
-7744 92
6002 461
5053 305
-1339 272
-821 165
9308 785
929 421
8384 883
1266 157
8411 923
-2949 885
7725 687
6859 197
-7630 867
5031 918
5662 410
41

11 12
 2 3
 5 5
 9 9

#include <bits/stdc++.h>
using namespace std;
struct Point {
  Point() {}
  Point(long long _x, long long _y) : x(_x), y(_y) {}
  long long x, y;
};
struct Cmp {
  bool operator()(const Point& p, const Point& q) {
    if (p.x != q.x) return p.x < q.x;
    return p.y < q.y;
  }
};
int treeSize;
vector<int> tree;
void buildTree(int n) {
  treeSize = 1;
  while (treeSize < n) treeSize <<= 1;
  tree.assign(treeSize * 2 - 1, 0);
}
inline void ifmax(int& a, int b) {
  if (a < b) a = b;
}
void update(int pos, int value) {
  pos += treeSize - 1;
  if (tree[pos] >= value) return;
  tree[pos] = value;
  while (pos > 0) {
    pos = (pos - 1) >> 1;
    ifmax(tree[pos], tree[((pos << 1) + 1)]);
    ifmax(tree[pos], tree[((pos + 1) << 1)]);
  }
}
inline int bit(int val, int i) { return (val >> i) & 1; }
int rmq(int l, int r) {
  l += treeSize - 1;
  r += treeSize - 1;
  int result = 0;
  while (l < r) {
    if (bit(l, 0) == 0) {
      ifmax(result, tree[l++]);
    }
    if (bit(r, 0) == 1) {
      ifmax(result, tree[r--]);
    }
    l = (l - 1) >> 1;
    r = (r - 1) >> 1;
  }
  ifmax(result, tree[l]);
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<pair<int, int> > events(n);
  {
    for (int i = 0; i < int(n); ++i) {
      int x, t;
      cin >> events[i].first >> events[i].second;
    }
  }
  long long speed;
  cin >> speed;
  vector<Point> points(n);
  for (int i = 0; i < int(n); ++i)
    points[i] = Point(-events[i].first - speed * events[i].second,
                      events[i].first - speed * events[i].second);
  sort((points).begin(), (points).end(), Cmp());
  ;
  buildTree(n);
  vector<long long> ycoords(points.size());
  for (int i = 0; i < int((points).size()); ++i) ycoords[i] = points[i].y;
  sort((ycoords).begin(), (ycoords).end());
  ycoords.erase(unique((ycoords).begin(), (ycoords).end()), ycoords.end());
  int ans1 = 0, ans2 = 0;
  for (int i = 0; i < int((points).size()); ++i) {
    int y = int(lower_bound((ycoords).begin(), (ycoords).end(), points[i].y) -
                ycoords.begin());
    int maxValue = rmq(0, y);
    ifmax(ans2, maxValue + 1);
    update(y, maxValue + 1);
    if (points[i].x <= 0) {
      int y = int(upper_bound((ycoords).begin(), (ycoords).end(), 0) -
                  ycoords.begin()) -
              1;
      ifmax(ans1, rmq(0, y));
    }
  }
  cout << ans1 << " " << ans2 << endl;
}
