#include <stdio.h>
#include <string.h>
#define MaxN 100010
#define MaxBuf 1<<22
#define RG register
#define inline __inline__ __attribute__((always_inline))
#define Blue() ((S == T && (T=(S=B)+fread(B,1,MaxBuf,stdin),S == T)) ? 0 : *S++)
#define mid ((x>>1)+(y>>1)+(x&y&1))
#define dmax(a,b) ((a)>(b)?(a):(b))
char B[MaxBuf],*S=B,*T=B;
inline void Rin(RG int &x) {
x=0;RG int c=Blue(),f=1;
for(; c<48||c>57; c=Blue())
if(c==45)f=-1;
for(; c>47&&c<58; c=Blue())
x=(x<<1)+(x<<3)+c-48;
x*=f; }
double tr[MaxN<<2];
int n,m,ans,sum[MaxN<<2];
int calc(RG int x,RG int y,RG int k,RG double val) {
if(x == y)return tr[k] > val;
if(tr[k<<1] < val)
return calc(mid+1,y,k<<1|1,val);
return sum[k]-sum[k<<1]+calc(x,mid,k<<1,val);
}
void modify(RG int x,RG int y,RG int k,RG int pos,RG double val) {
if(x == y) {
tr[k]=val;
sum[k]=1;
return; }
pos <= mid ? modify(x,mid,k<<1,pos,val) : modify(mid+1,y,k<<1|1,pos,val);
tr[k]=dmax(tr[k<<1],tr[k<<1|1]);
sum[k]=sum[k<<1]+calc(mid+1,y,k<<1|1,tr[k<<1]);
}
int main() {
Rin(n),Rin(m);
while(m--) {
RG int pos,x;
Rin(pos),Rin(x);
modify(1,n,1,pos,(double)x/pos);
printf("%d\n",sum[1]); }
fclose(stdin);
return 0; }