#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<stack>
#include<cstring>
#include<set>
#include<iterator>
#include<list>
#include<deque>
#include<queue>
#include<map>
#include<cmath>
#include<sstream>
#include<cstdio>
#include<ctime>
#include<iomanip>
//#include<unordered_set>
using namespace std;
#define lowbit(x) x&(-x)
typedef long long ll;
typedef pair<int, int> P;
const int N = 1e5 + 10;
const int inf = 0x3f3f3f3f;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + 7;
struct Segmenttree
{
int l, r;
double maxl;
int val;
}t[N << 2];
void build(int p, int l, int r)
{
//cout << l << " " << r << endl;
t[p].l = l, t[p].r = r;
t[p].maxl = t[p].val = 0;
if (l == r)
return;
int mid = (l + r) >> 1;
build(p << 1, l, mid);
build(p << 1 | 1, mid + 1, r);
}
int calc(int p , double height)
{
if (t[p].l == t[p].r)
return height < t[p].maxl;
int mid = (t[p].l + t[p].r) >> 1;
if (t[p << 1].maxl <= height)
return calc(p << 1 | 1, height);
else
return t[p].val - t[p << 1].val + calc(p << 1, height);
}
void update(int p, int x, double val)
{
if (t[p].l == t[p].r)
{
t[p].maxl = val;
t[p].val = 1;
return;
}
int mid = (t[p].l + t[p].r) >> 1;
if (x <= mid)
{
update(p << 1, x, val);
}
else
{
update(p << 1 | 1, x, val);
}
t[p].maxl = max(t[p << 1].maxl, t[p << 1 | 1].maxl);
t[p].val = t[p << 1].val + calc(p << 1 | 1, t[p << 1].maxl);
}
int main()
{
//freopen("e://2957/2.in", "r", stdin);
//freopen("e://myout.out", "w", stdout);
//ios::sync_with_stdio(false);
//cin.tie(0), cout.tie(0);
int n, m;
//cin >> n >> m;
scanf("%d%d", &n, &m);
build(1, 1, n);
for (int i = 1; i <= m; i++)
{
int x, y;
//cin >> x >> y;
scanf("%d%d", &x, &y);
//cout <<fixed<< "val == " << 1.0*y / x << endl;
update(1, x, 1.0*y / x);
//cout << t[1].val << endl;
printf("%d\n", t[1].val);
}
return 0;
}