#include<cstdio>
#include<cstdlib>
#include<iostream>
using namespace std;
struct pos
{
long long q;
long long z;
}f[200000];
int main()
{
freopen("cowjoga.in","r",stdin);
freopen("cowjoga.out","w",stdout);
int n;
long long t;
scanf("%d%lld",&n,&t);
long long maxh=0;
int ans=0;
long long v;
for(int i=1;i<=n;++i)
{
scanf("%lld%lld",&f[i].q,&v);
f[i].z=(long long)(f[i].q+v*t);
if(f[i].z>maxh)
{
++ans;
}
maxh=f[i].z;
}
printf("%d\n",ans);
return 0;
}