#include<cstdio>
#include<cstring>
#include<algorithm>
using std::max;
const int M=1e5+7;
int read(){
int ans=0,f=1,c=getchar();
while(c<‘0‘||c>‘9‘){if(c==‘-‘) f=-1; c=getchar();}
while(c>=‘0‘&&c<=‘9‘){ans=ans*10+(c-‘0‘); c=getchar();}
return ans*f;
}
struct pos{int ans;double mx;}tr[4*M];
int n,m,pos;
double val;
int calc(int x,int l,int r,double val){
if(l==r) return tr[x].mx>val;
int mid=(l+r)>>1;
if(tr[x<<1].mx<=val) return calc(x<<1^1,mid+1,r,val);
return tr[x].ans-tr[x<<1].ans+calc(x<<1,l,mid,val);
}
void modify(int x,int l,int r){
if(l==r){
tr[x].ans=1;
tr[x].mx=val;
return ;
}
int mid=(l+r)>>1;
if(pos<=mid) modify(x<<1,l,mid);
else modify(x<<1^1,mid+1,r);
tr[x].mx=max(tr[x<<1].mx,tr[x<<1^1].mx);
tr[x].ans=tr[x<<1].ans+calc(x<<1^1,mid+1,r,tr[x<<1].mx);
}
int main(){
int y;
n=read(); m=read();
for(int i=1;i<=m;i++){
pos=read();
y=read(); val=(1.0*y)/(1.0*pos);
modify(1,1,n);
printf("%d\n",tr[1].ans);
}
return 0;
}