#include<stdio.h>
const int maxn=1000010;
long long pos[maxn];
long long v[maxn];
long long p[maxn];
int ans=0;
int n,t;
int main()
{
freopen("cowjoga.in","r",stdin);
freopen("cowjoga.out","w",stdout);
scanf("%d%d",&n,&t);
for(int i=1;i<=n;i++)
{
scanf("%d%d",&pos[i],&v[i]);
p[i]=pos[i]+v[i]*t;
}
ans=1;
long long now=p[n];
for(int i=n-1;i>=1;i--)
{
if(p[i]<now)
{
ans++;
now=p[i];
}
}
printf("%d\n",ans);
}