#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<bitset>
#define ls k<<1
#define rs k<<1|1
using namespace std;
const int MAXN=1000001;
inline void read(int &n)
{
char c='+';int x=0;bool flag=0;
while(c<'0'||c>'9'){c=getchar();if(c=='-')flag=1;}
while(c>='0'&&c<='9'){x=x*10+(c-48);c=getchar();}
n=flag==1?-x:x;
}
struct node
{
int l,r,num;
double maxrake;
}tree[MAXN<<2];
int n,m;
int calc(int k,double val)
{
if(tree[k].l==tree[k].r)
return tree[k].maxrake>val;// 能看见
if(tree[ls].maxrake<=val)
return calc(rs,val);// 最高的都比它小,直接计算右边
return tree[k].num-tree[ls].num+calc(ls,val);//
}
void update(int k)
{
tree[k].maxrake=max(tree[ls].maxrake,tree[rs].maxrake);
tree[k].num=tree[ls].num+calc(rs,tree[ls].maxrake);
}
void build_tree(int ll,int rr,int k)
{
tree[k].l=ll;tree[k].r=rr;
if(ll==rr)
return ;
int mid=(ll+rr)>>1;
build_tree(ll,mid,ls);
build_tree(mid+1,rr,rs);
}
void change(int k,int pos,double val)
{
if(tree[k].l==tree[k].r)
{
tree[k].num=1;
tree[k].maxrake=val;
return ;
}
int mid=(tree[k].l+tree[k].r)>>1;
if(pos<=mid) change(ls,pos,val);
else change(rs,pos,val);
update(k);
}
int main()
{
freopen("hh.in","r",stdin);
read(n);read(m);
build_tree(1,n,1);
for(int i=1;i<=m;i++)
{
int pos,h;
read(pos);read(h);
change(1,pos,(double)h/pos);
printf("%d\n",tree[1].num);
}
return 0;
}