#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pi (4*atan(1.0))
#define eps 1e-14
const int N=4e5+100,M=4e6+10,inf=1e9+10,mod=1e9+7;
const ll INF=1e18+10;
struct is
{
int l,r;
double maxx;
int ans;
}tree[N];
void build(int l,int r,int pos)
{
tree[pos].l=l;
tree[pos].r=r;
tree[pos].ans=0;
tree[pos].maxx=0.0;
if(l==r)return;
int mid=(l+r)>>1;
build(l,mid,pos<<1);
build(mid+1,r,pos<<1|1);
}
int getans(double v,int pos)
{
if(tree[pos].l==tree[pos].r)
return (tree[pos].maxx>v);
if(tree[pos<<1].maxx<=v)
return getans(v,pos<<1|1);
return tree[pos].ans-tree[pos<<1].ans+getans(v,pos<<1);
}
void pushup(int pos)
{
tree[pos].maxx=max(tree[pos<<1].maxx,tree[pos<<1|1].maxx);
tree[pos].ans=tree[pos<<1].ans+getans(tree[pos<<1].maxx,pos<<1|1);
}
void update(int p,double c,int pos)
{
if(tree[pos].l==tree[pos].r)
{
tree[pos].maxx=c;
tree[pos].ans=1;
return;
}
int mid=(tree[pos].l+tree[pos].r)>>1;
if(p<=mid)
update(p,c,pos<<1);
else
update(p,c,pos<<1|1);
pushup(pos);
}
int main()
{
int n,m;
while(~scanf("%d%d",&n,&m))
{
build(1,n,1);
while(m--)
{
int x,y;
scanf("%d%d",&x,&y);
update(x,(double)(y/x),1);
printf("%d\n",tree[1].ans);
}
}
return 0;
}