#include<algorithm>
#include<bitset>
#include<deque>
#include<iomanip>
#include<iostream>
#include<iterator>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<utility>
#include<vector>
#include<chrono>
#include<random>
#include<tuple>
#include<unordered_map>
using namespace std;
#define int long long
#define pii pair<int,int>
#define fi first
#define se second
#define mp make_pair
#define debug1(x) cerr<<#x<<"="<<x<<" "
#define debug2(x) cerr<<#x<<"="<<x<<"\n"
#define ls(id) (id<<1)
#define rs(id) ((id<<1)|1)
#define inr(l,r,cl,cr) (cl<=l and r<=cr)
const int inf=1e16,maxn=1e5+10;
const double eps=1e-12;
double a[maxn];
namespace exstd{
struct sgmtree{
int w[maxn<<2];
double maxs[maxn<<2];
int calc(int id,int l,int r,double pos){
if(l==r){
return maxs[id]<=pos;
}
int mid=(l+r)>>1;
if(maxs[ls(id)]-pos>eps)return calc(ls(id),l,mid,pos);
return w[ls(id)]+calc(rs(id),mid+1,r,pos);
}
void pushup(int id,int l,int r){
int mid=(l+r)>>1;
maxs[id]=max(maxs[ls(id)],maxs[rs(id)]);
if(maxs[ls(id)]-maxs[rs(id)]>eps)w[id]=w[ls(id)];
else if(a[mid+1]-maxs[ls(id)]>eps)w[id]=w[ls(id)]+w[rs(id)];
else w[id]=w[ls(id)]+w[rs(id)]-calc(rs(id),mid+1,r,maxs[ls(id)]);
}
void update(int id,int l,int r,int cx,double pos){
if(l==r){w[id]=1;maxs[id]=pos;return;}
int mid=(l+r)>>1;
if(cx<=mid)update(ls(id),l,mid,cx,pos);
else update(rs(id),mid+1,r,cx,pos);
pushup(id,l,r);
}
};
}
exstd::sgmtree t;
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
int n,m;cin>>n>>m;
while(m--){
int x,y;cin>>x>>y;
a[x]=y*1.0/x;
t.update(1,1,n,x,y*1.0/x);
cout<<t.w[1]<<"\n";
}
return 0;
}