// MADE BY QT666
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<iostream>
#include<cstring>
#define RG register
using namespace std;
typedef long long ll;
const int N=100050;
const double eps=1e-6;
int pos[N],block,cnt,L[N],R[N],n,m,num[400];
double g[N],Max[400],bl[400][400];
void update(int x,double val){
g[x]=val;int l=L[pos[x]],r=R[pos[x]];
num[pos[x]]=0;Max[pos[x]]=0;
for(RG int i=l;i<=r;i++){
if(g[i]-0>=eps&&g[i]>Max[pos[x]]){
bl[pos[x]][++num[pos[x]]]=g[i];
Max[pos[x]]=max(Max[pos[x]],g[i]);
}
}
}
int query(int l,int r){
double ret=0;int res=0;
if(pos[l]==pos[r]){
for(RG int i=l;i<=r;i++){
if(g[i]-0>=eps&&g[i]>ret) ret=max(ret,g[i]),res++;
}
}
else{
for(RG int i=l;i<=R[pos[l]];i++){
if(g[i]-0>=eps&&g[i]>ret) ret=max(ret,g[i]),res++;
}
for(RG int i=pos[l]+1;i<=pos[r]-1;i++){
if(bl[i][num[i]]>ret){
int gg=upper_bound(bl[i]+1,bl[i]+num[i]+1,ret)-bl[i];
if(bl[i][gg]>ret) res+=(num[i]-gg+1);
ret=max(ret,Max[i]);
}
}
for(RG int i=L[pos[r]];i<=r;i++){
if(g[i]-0>=eps&&g[i]>ret) ret=max(ret,g[i]),res++;
}
}
return res;
}
int main(){
scanf("%d%d",&n,&m);
block=sqrt(n);cnt=n/block;
if(n%block) cnt++;
for(RG int i=1;i<=n;i++) pos[i]=(i-1)/block+1;
for(RG int i=1;i<=cnt;i++) L[i]=(i-1)*block+1,R[i]=i*block;
R[cnt]=n;
for(RG int i=1;i<=m;i++){
int x,h;scanf("%d%d",&x,&h);
update(x,h*1.0/x);
printf("%d\n",query(1,n));
}
return 0;
}