#include<bits/stdc++.h>

#define ll long long
#define INF 2147483647
#define tr(a) ((a) << 1)
#define fs(a) ((a) << 1 | 1)

int inp(){
    char c = getchar();
    while(c < '0' || c > '9')
        c = getchar();
    int sum = 0;
    while(c >= '0' && c <= '9'){
        sum = sum * 10 + c - '0';
        c = getchar();
    }
    return sum;
}

int head[1600010], nxt[1600010], end[1600010];
int dfn[1600010], low[1600010], col[1600010], st[1600010], top = 0;
bool ins[1600010];

int cnt = 0;
int idx = 0;
void tarjan(int cur){
    // printf("cur = %d\n", cur);
    dfn[cur] = low[cur] = ++idx;
    st[++top] = cur;
    ins[cur] = true;
    for(int x = head[cur]; x != -1; x = nxt[x]){
        if(!dfn[end[x]]){
            tarjan(end[x]);
            low[cur] = std::min(low[cur], low[end[x]]);
        } else if(ins[end[x]])
            low[cur] = std::min(low[cur], dfn[end[x]]);
    }
    // printf("dfn[%d] = %d, low[%d] = %d\n", cur, dfn[cur], cur, low[cur]);
    if(dfn[cur] == low[cur]){
        cnt++;
        while(st[top] != cur){
            // printf("cur = %d\n", st[top]);
            col[st[top]] = cnt;
            ins[st[top]] = false;
            top--;
        }
        col[cur] = cnt;
        top--;
        ins[cur] = false;
    }
}
int cou = 0;
void link(int a, int b){
    nxt[++cou] = head[a];
    head[a] = cou;
    end[cou] = b;
}

int main(){
    memset(head, -1, sizeof(head));
    int p = inp();
    int n = inp();
    int M = inp();
    int m = inp();
    for(int i = 1; i <= p; i++){
        int u = inp();
        int v = inp();
        link(fs(u), tr(v));
        link(fs(v), tr(u));
    }
    link(tr(n + 1), fs(n + 1));
    for(int i = 1; i <= n; i++){
        int l = inp();
        int r = inp();
        link(tr(i), tr(n + r + 1));
        link(fs(n + r + 1), fs(i));
        link(tr(i), fs(n + l));
        link(tr(n + l), fs(i));
    }
    for(int i = 1; i <= m; i++){
        int u = inp();
        int v = inp();
        link(tr(u), fs(v));
        link(tr(v), fs(u));
    }
    for(int i = n + 1; i <= n + M; i++){
        link(tr(i), tr(i + 1));
        link(fs(i + 1), fs(i));
    }
    for(int i = 1; i <= fs(n + M + 1); i++)
        if(!dfn[i])
            tarjan(i);
    std::vector<int> vec;
    for(int i = 1; i <= n + M + 1; i++){
        // printf("{%d, %d}\n", col[tr(i)], col[fs(i)]);
        if(col[tr(i)] == col[fs(i)]){
            printf("-1\n");
            return 0;
        }
        if(i <= n && col[tr(i)] < col[fs(i)])
            vec.push_back(i);
    }
    printf("%d ", vec.size());
    for(int i = n + 2; i <= n + M + 1; i++){
        if(col[tr(i)] < col[fs(i)]){
            printf("%d\n", i - n - 1);
            break;
        }
    }
    for(int i = 0; i < vec.size(); i++)
        printf("%d ", vec[i]);
    putchar('\n');
}


#include<bits/stdc++.h>

#define ll long long
#define INF 2147483647
#define tr(a) ((a) << 1)
#define fs(a) ((a) << 1 | 1)

int inp(){
    char c = getchar();
    while(c < '0' || c > '9')
        c = getchar();
    int sum = 0;
    while(c >= '0' && c <= '9'){
        sum = sum * 10 + c - '0';
        c = getchar();
    }
    return sum;
}

int head[3200010], nxt[4000010], end[4000010];
int dfn[3200010], low[3200010], col[3200010], st[3200010], top = 0;
bool ins[3200010];

int cnt = 0;
int idx = 0;
void tarjan(int cur){
    // printf("cur = %d\n", cur);
    dfn[cur] = low[cur] = ++idx;
    st[++top] = cur;
    ins[cur] = true;
    for(int x = head[cur]; x != -1; x = nxt[x]){
        if(!dfn[end[x]]){
            tarjan(end[x]);
            low[cur] = std::min(low[cur], low[end[x]]);
        } else if(ins[end[x]])
            low[cur] = std::min(low[cur], dfn[end[x]]);
    }
    // printf("dfn[%d] = %d, low[%d] = %d\n", cur, dfn[cur], cur, low[cur]);
    if(dfn[cur] == low[cur]){
        cnt++;
        while(st[top] != cur){
            // printf("cur = %d\n", st[top]);
            col[st[top]] = cnt;
            ins[st[top]] = false;
            top--;
        }
        col[cur] = cnt;
        top--;
        ins[cur] = false;
    }
}
int cou = 0;
void link(int a, int b){
    nxt[++cou] = head[a];
    head[a] = cou;
    end[cou] = b;
}

int main(){
    memset(head, -1, sizeof(head));
    int p = inp();
    int n = inp();
    int M = inp();
    int m = inp();
    for(int i = 1; i <= p; i++){
        int u = inp();
        int v = inp();
        link(fs(u), tr(v));
        link(fs(v), tr(u));
    }
    link(tr(n + 1), fs(n + 1));
    for(int i = 1; i <= n; i++){
        int l = inp();
        int r = inp();
        link(tr(i), tr(n + r + 1));
        link(fs(n + r + 1), fs(i));
        link(tr(i), fs(n + l));
        link(tr(n + l), fs(i));
    }
    for(int i = 1; i <= m; i++){
        int u = inp();
        int v = inp();
        link(tr(u), fs(v));
        link(tr(v), fs(u));
    }
    for(int i = n + 1; i <= n + M; i++){
        link(tr(i), tr(i + 1));
        link(fs(i + 1), fs(i));
    }
    for(int i = 1; i <= fs(n + M + 1); i++)
        if(!dfn[i])
            tarjan(i);
    std::vector<int> vec;
    for(int i = 1; i <= n + M + 1; i++){
        // printf("{%d, %d}\n", col[tr(i)], col[fs(i)]);
        if(col[tr(i)] == col[fs(i)]){
            printf("-1\n");
            return 0;
        }
        if(i <= n && col[tr(i)] < col[fs(i)])
            vec.push_back(i);
    }
    printf("%d ", vec.size());
    for(int i = n + 2; i <= n + M + 1; i++){
        if(col[tr(i)] < col[fs(i)]){
            printf("%d\n", i - n - 1);
            break;
        }
    }
    for(int i = 0; i < vec.size(); i++)
        printf("%d ", vec[i]);
    putchar('\n');
}


#include<bits/stdc++.h>
#define ts cout<<"ok"<<endl
#define ll long long
#define hh puts("")
#define pc putchar
//#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
//char buf[1<<21],*p1=buf,*p2=buf;
using namespace std;
const int N=3000005;
int n,p,M,m,dfn[N],low[N],vis[N],top,st[N],dep,col[N],col_cnt;
int cnt,head[N],pre[N],suf[N],res[N],ans,l[N],r[N];
struct Edge{
	int v,nx;
}e[N<<2];
inline int read(){
    int ret=0,ff=1;char ch=getchar();
    while(!isdigit(ch)){if(ch=='-') ff=-ff;ch=getchar();}
    while(isdigit(ch)){ret=(ret<<3)+(ret<<1)+ch-'0';ch=getchar();}
    return ret*ff;
}
void write(int x){
    if(x<0){x=-x;putchar('-');}
    if(x>9) write(x/10);
    putchar(x%10+48);
}
void writeln(int x){write(x),hh;}
void add(int x,int y){
	e[++cnt].v=y;
	e[cnt].nx=head[x];
	head[x]=cnt;
}
void tarjan(int now){
	dfn[now]=low[now]=++dep;
	st[++top]=now;
	vis[now]=1;
	for(int i=head[now];i;i=e[i].nx){
		int v=e[i].v;
		if(!dfn[v]){
			tarjan(v);
			low[now]=min(low[now],low[v]);
		}
		else if(vis[v]) low[now]=min(low[now],dfn[v]);
	}
	if(low[now]==dfn[now]){
		col_cnt++;
		int t;
		do{
			t=st[top];
			col[t]=col_cnt;
			vis[t]=0;
			top--;
		}while(t!=now);
	}
}
signed main(){
	n=read(),p=read(),M=read(),m=read();//n个两者选1的限制,p个电台,区间为[1,M],m个不能同时选的限制
	//i->1~p:选i;i->p+1~2*p:不选i
	int id=p<<1;
	pre[1]=++id;
	suf[1]=id+M;
	for(int i=2;i<=M;i++){
		pre[i]=++id;
		suf[i]=id+M;
		//选了大区间就不能选小区间
		add(pre[i],pre[i-1]);
		add(suf[i-1],suf[i]);
	}
	for(int i=1;i<=n;i++){
		int x=read(),y=read();
		add(x+p,y),add(y+p,x);
	}
	for(int i=1;i<=p;i++){
		l[i]=read();
		r[i]=read();
		if(l[i]-1>=1) add(i,pre[l[i]-1]);
		if(r[i]+1<=M) add(i,suf[r[i]+1]);
		add(pre[r[i]],i+p);
		add(suf[l[i]],i+p);
	}
	for(int i=1;i<=m;i++){
		int x=read(),y=read();
		add(x,y+p);
		add(y,x+p);
	}
	int all=p<<1;
	for(int i=1;i<=all;i++)
		if(!dfn[i])
			tarjan(i);
	for(int i=1;i<=p;i++){
		if(col[i]==col[i+p]){
			printf("-1");
			return 0;
		}
	}
	int power=0;
	for(int i=1;i<=p;i++){
		if(col[i]<col[i+p]){//颜色小拓扑序大
			res[++ans]=i;
			power=max(power,l[i]);//最大的l肯定满足条件
		}
	}
	write(ans),pc(' '),writeln(power);
	for(int i=1;i<=ans;i++) write(res[i]),pc(' ');
    return 0;
}


#include<bits/stdc++.h>
#define ts cout<<"ok"<<endl
#define ll long long
#define hh puts("")
#define pc putchar
//#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
//char buf[1<<21],*p1=buf,*p2=buf;
using namespace std;
const int N=1000005;
int n,p,M,m,dfn[N],low[N],vis[N],top,st[N],dep,col[N],col_cnt;
int cnt,head[N],pre[N],suf[N],res[N],ans,l[N],r[N];
struct Edge{
	int v,nx;
}e[N<<3];
inline int read(){
    int ret=0,ff=1;char ch=getchar();
    while(!isdigit(ch)){if(ch=='-') ff=-ff;ch=getchar();}
    while(isdigit(ch)){ret=(ret<<3)+(ret<<1)+ch-'0';ch=getchar();}
    return ret*ff;
}
void write(int x){
    if(x<0){x=-x;putchar('-');}
    if(x>9) write(x/10);
    putchar(x%10+48);
}
void writeln(int x){write(x),hh;}
void add(int x,int y){
	e[++cnt].v=y;
	e[cnt].nx=head[x];
	head[x]=cnt;
}
void tarjan(int now){
	dfn[now]=low[now]=++dep;
	st[++top]=now;
	vis[now]=1;
	for(int i=head[now];i;i=e[i].nx){
		int v=e[i].v;
		if(!dfn[v]){
			tarjan(v);
			low[now]=min(low[now],low[v]);
		}
		else if(vis[v]) low[now]=min(low[now],dfn[v]);
	}
	if(low[now]==dfn[now]){
		col_cnt++;
		int t;
		do{
			t=st[top];
			col[t]=col_cnt;
			vis[t]=0;
			top--;
		}while(t!=now);
	}
}
signed main(){
	n=read(),p=read(),M=read(),m=read();//n个两者选1的限制,p个电台,区间为[1,M],m个不能同时选的限制
	//i->1~p:选i;i->p+1~2*p:不选i
	int id=p<<1;
	pre[1]=++id;
	suf[1]=id+M;
	for(int i=2;i<=M;i++){
		pre[i]=++id;
		suf[i]=id+M;
		//选了大区间就不能选小区间
		add(pre[i],pre[i-1]);
		add(suf[i-1],suf[i]);
	}
	for(int i=1;i<=n;i++){
		int x=read(),y=read();
		add(x+p,y),add(y+p,x);
	}
	for(int i=1;i<=p;i++){
		l[i]=read();
		r[i]=read();
		if(l[i]-1>=1) add(i,pre[l[i]-1]);
		if(r[i]+1<=M) add(i,suf[r[i]+1]);
		add(pre[r[i]],i+p);
		add(suf[l[i]],i+p);
	}
	for(int i=1;i<=m;i++){
		int x=read(),y=read();
		add(x,y+p);
		add(y,x+p);
	}
	int all=p<<1;
	for(int i=1;i<=all;i++)
		if(!dfn[i])
			tarjan(i);
	for(int i=1;i<=p;i++){
		if(col[i]==col[i+p]){
			printf("-1");
			return 0;
		}
	}
	int power=0;
	for(int i=1;i<=p;i++){
		if(col[i]<col[i+p]){//颜色小拓扑序大
			res[++ans]=i;
			power=max(power,l[i]);//最大的l肯定满足条件
		}
	}
	write(ans),pc(' '),writeln(power);
	for(int i=1;i<=ans;i++) write(res[i]),pc(' ');
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=200005;
const int maxm=1600005;
int head[maxm],ecnt;
struct edge{
    int to,nxt;
}e[maxm<<1];
void ins(int u,int v){
    e[++ecnt].to=v;
    e[ecnt].nxt=head[u];
    head[u]=ecnt;
}
int dfn[maxn],low[maxn],cnt;
int s[maxn],top,sum;
int bl[maxn];
void dfs(int x){
    dfn[x]=low[x]=++cnt;
    s[++top]=x;
    for(int i=head[x];i;i=e[i].nxt){
        int v=e[i].to;
        if(!dfn[v]){
            dfs(v);
            low[x]=min(low[x],low[v]);
        }else if(!bl[v])  low[x]=min(low[x],dfn[v]);
    }
    if(dfn[x]==low[x]){
        sum++;
        while (s[top]!=x){
            bl[s[top]]=sum;
            top--;
        }
        bl[x]=sum; top--;
    }
}
int n,p,m,t;
int vis[maxn];
int main(){
    scanf("%d%d%d%d",&n,&p,&m,&t);
    for(int i=1;i<=n;i++){
        int x,y;
        scanf("%d%d",&x,&y);
        ins(x<<1,y<<1|1);
        ins(y<<1,x<<1|1);
    }
    for(int i=1;i<=m;i++){
        ins((p+i)<<1|1,(p+i+1)<<1|1);
        ins((p+i+1)<<1,(p+i)<<1);
    }
    for(int i=1;i<=p;i++){
        int l,r;
        scanf("%d%d",&l,&r);
        ins((p+l)<<1|1,i<<1);
        ins(i<<1|1,(p+l)<<1);
        ins((p+r+1)<<1,i<<1);
        ins(i<<1|1,(p+r+1)<<1|1);
    }
    for(int i=1;i<=t;i++){
        int x,y;
        scanf("%d%d",&x,&y);
        ins(x<<1|1,y<<1);
        ins(y<<1|1,x<<1);
    }
    int ans=0;
    for(int i=2;i<=(p+m)*2+3;i++)
        if(!bl[i])dfs(i);
    int f=m;
    for(int i=1;i<=p+m+1;i++){
        if(bl[i<<1]==bl[i<<1|1]){
            puts("-1");
            return 0;
        }else{
            vis[i]=(bl[i<<1|1]<bl[i<<1]);
            if(i<=p)ans+=vis[i];
        }
    }
    while(f&&vis[p+f+1])f--;
    printf("%d %d\n",ans,f+1);
    for(int i=1;i<=p;i++){
        if(vis[i])printf("%d ",i);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=1600005;
const int maxm=1600005;
int head[maxm],ecnt;
struct edge{
    int to,nxt;
}e[maxm<<1];
void ins(int u,int v){
    e[++ecnt].to=v;
    e[ecnt].nxt=head[u];
    head[u]=ecnt;
}
int dfn[maxn],low[maxn],cnt;
int s[maxn],top,sum;
int bl[maxn];
void dfs(int x){
    dfn[x]=low[x]=++cnt;
    s[++top]=x;
    for(int i=head[x];i;i=e[i].nxt){
        int v=e[i].to;
        if(!dfn[v]){
            dfs(v);
            low[x]=min(low[x],low[v]);
        }else if(!bl[v])  low[x]=min(low[x],dfn[v]);
    }
    if(dfn[x]==low[x]){
        sum++;
        while (s[top]!=x){
            bl[s[top]]=sum;
            top--;
        }
        bl[x]=sum; top--;
    }
}
int n,p,m,t;
int vis[maxn];
int main(){
    scanf("%d%d%d%d",&n,&p,&m,&t);
    for(int i=1;i<=n;i++){
        int x,y;
        scanf("%d%d",&x,&y);
        ins(x<<1,y<<1|1);
        ins(y<<1,x<<1|1);
    }
    for(int i=1;i<=m;i++){
        ins((p+i)<<1|1,(p+i+1)<<1|1);
        ins((p+i+1)<<1,(p+i)<<1);
    }
    for(int i=1;i<=p;i++){
        int l,r;
        scanf("%d%d",&l,&r);
        ins((p+l)<<1|1,i<<1);
        ins(i<<1|1,(p+l)<<1);
        ins((p+r+1)<<1,i<<1);
        ins(i<<1|1,(p+r+1)<<1|1);
    }
    for(int i=1;i<=t;i++){
        int x,y;
        scanf("%d%d",&x,&y);
        ins(x<<1|1,y<<1);
        ins(y<<1|1,x<<1);
    }
    int ans=0;
    for(int i=2;i<=(p+m)*2+3;i++)
        if(!bl[i])dfs(i);
    int f=m;
    for(int i=1;i<=p+m+1;i++){
        if(bl[i<<1]==bl[i<<1|1]){
            puts("-1");
            return 0;
        }else{
            vis[i]=(bl[i<<1|1]<bl[i<<1]);
            if(i<=p)ans+=vis[i];
        }
    }
    while(f&&vis[p+f+1])f--;
    printf("%d %d\n",ans,f+1);
    for(int i=1;i<=p;i++){
        if(vis[i])printf("%d ",i);
    }
    return 0;
}


    #include<bits/stdc++.h>
    using namespace std;
    const int maxn=200005;
    const int maxm=1600005;
    int head[maxm],ecnt;
    struct edge{
        int to,nxt;
    }e[maxm<<2];
    void ins(int u,int v){
        e[++ecnt].to=v;
        e[ecnt].nxt=head[u];
        head[u]=ecnt;
    }
    int dfn[maxn],low[maxn],cnt;
    int s[maxn],top,sum;
    int bl[maxn];
    void dfs(int x){
        dfn[x]=low[x]=++cnt;
        s[++top]=x;
        for(int i=head[x];i;i=e[i].nxt){
            int v=e[i].to;
            if(!dfn[v]){
                dfs(v);
                low[x]=min(low[x],low[v]);
            }else if(!bl[v])  low[x]=min(low[x],dfn[v]);
        }
        if(dfn[x]==low[x]){
            sum++;
            while (s[top]!=x){
                bl[s[top]]=sum;
                top--;
            }
            bl[x]=sum; top--;
        }
    }
    int n,p,m,t;
    int vis[maxn];
    int main(){
        scanf("%d%d%d%d",&n,&p,&m,&t);
        for(int i=1;i<=n;i++){
            int x,y;
            scanf("%d%d",&x,&y);
            ins(x<<1,y<<1|1);
            ins(y<<1,x<<1|1);
        }
        for(int i=1;i<=m;i++){
            ins((p+i)<<1|1,(p+i+1)<<1|1);
            ins((p+i+1)<<1,(p+i)<<1);
        }
        for(int i=1;i<=p;i++){
            int l,r;
            scanf("%d%d",&l,&r);
            ins((p+l)<<1|1,i<<1);
            ins(i<<1|1,(p+l)<<1);
            ins((p+r+1)<<1,i<<1);
            ins(i<<1|1,(p+r+1)<<1|1);
        }
        for(int i=1;i<=t;i++){
            int x,y;
            scanf("%d%d",&x,&y);
            ins(x<<1|1,y<<1);
            ins(y<<1|1,x<<1);
        }
        int ans=0;
        for(int i=2;i<=(p+m)*2+3;i++)
            if(!bl[i])dfs(i);
        int f=m;
        for(int i=1;i<=p+m+1;i++){
            if(bl[i<<1]==bl[i<<1|1]){
                puts("-1");
                return 0;
            }else{
                vis[i]=(bl[i<<1|1]<bl[i<<1]);
                if(i<=p)ans+=vis[i];
            }
        }
        while(f&&vis[p+f+1])f--;
        printf("%d %d\n",ans,f+1);
        for(int i=1;i<=p;i++){
            if(vis[i])printf("%d ",i);
        }
        return 0;
    }


#include <bits/stdc++.h>
using namespace std;

#define pii pair<int, int>
#define ll long long

const int	MaxN(300003);
int		a[MaxN], b[MaxN], S[MaxN], top;
map<pii, int>	F;

struct node
{
	int	x, y;
	inline bool operator < (const node &T) const
	{
		return y == T.y ? x > T.x : y < T.y;
	}
}p[MaxN];

double cross(const node &p1, const node &p2)
{
	//return (p1.x - p2.x) / (p1.y  - p2.y);
	//return (1.0 / p1.x - 1.0 / p2.x) / (1.0 / p1.y - 1.0 / p2.y);
	return 1.0 * (p2.x - p1.x) * p1.y * p2.y / (1.0 * p1.x * p2.x * (p2.y - p1.y));
}

int main()
{
	int	n;
	freopen("slay.in", "r", stdin);
	freopen("slay.out", "w", stdout);
	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d%d", &a[i], &b[i]);
		p[i].x = a[i], p[i].y = b[i];
	}
	sort(p + 1, p + 1 + n);
	for(int i = 1; i <= n; i++)
	{
		if(p[i].y == p[i - 1].y)
			continue;
		while(top > 1 && cross(p[S[top]], p[S[top - 1]]) < cross(p[i], p[S[top]]))
			--top;
		S[++top] = i;
	}
	for(int i = 1; i <= top; i++)
		F[pii(p[S[i]].x, p[S[i]].y)] = 1;
	for(int i = 1; i <= n; i++)
		if(F.count(pii(a[i], b[i])))
			printf("%d ", i);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define pii pair<int, int>
#define ll long long
#define ld long double

const int	MaxN(300003);
int		a[MaxN], b[MaxN], S[MaxN], top;
map<pii, int>	F;

struct node
{
	ld	x, y;
	inline bool operator < (const node &T) const
	{
		return y == T.y ? x > T.x : y < T.y;
	}
}p[MaxN];

ld cross(const node &p1, const node &p2)
{
	//return (p1.x - p2.x) / (p1.y  - p2.y);
	return (1e9 / p1.x - 1e9 / p2.x) / (1e9 / p1.y - 1e9 / p2.y);
	//return (ld) ((p2.x - p1.x) * p1.y * p2.y) / ((ld) p1.x * p2.x * (p2.y - p1.y));
}

int main()
{
	int	n;
	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d%d", &a[i], &b[i]);
		p[i].x = a[i], p[i].y = b[i];
	}
	sort(p + 1, p + 1 + n);
	p[0].x = 1e19, p[0].y = -1e9;
	S[top = 1] = 0;
	for(int i = 1; i <= n; i++)
	{
		if(p[i].y == p[i - 1].y)
			continue;
		while(top > 1 && cross(p[S[top]], p[S[top - 1]]) < cross(p[i], p[S[top]]))
			--top;
		S[++top] = i;
	}
	for(int i = 1; i <= top; i++)
		F[pii(p[S[i]].x, p[S[i]].y)] = 1;
	for(int i = 1; i <= n; i++)
		if(F.count(pii(a[i], b[i])))
			printf("%d ", i);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define pii pair<int, int>
#define ll long long

const int	MaxN(300003);
int		a[MaxN], b[MaxN], S[MaxN], top;
map<pii, int>	F;

struct node
{
	int	x, y;
	inline bool operator < (const node &T) const
	{
		return y == T.y ? x > T.x : y < T.y;
	}
}p[MaxN];

struct point
{
	double x, y;
}q[MaxN];

double cross(const point &p1, const point &p2)
{
	return (p1.x - p2.x) / (p1.y  - p2.y);
}

int main()
{
	int	n;
	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d%d", &a[i], &b[i]);
		p[i].x = a[i], p[i].y = b[i];
	}
	sort(p + 1, p + 1 + n);
	for(int i = 1; i <= n; i++)
	{
		q[i].x = 1e9 / p[i].x;
		q[i].y = 1e9 / p[i].y;
	}
	for(int i = 1; i <= n; i++)
	{
		if(p[i].y == p[i - 1].y)
			continue;
		while(top > 1 && cross(q[S[top]], q[S[top - 1]]) < cross(q[i], q[S[top]]))
			--top;
		S[++top] = i;
	}
	for(int i = 1; i <= top; i++)
		F[pii(p[S[i]].x, p[S[i]].y)] = 1;
	for(int i = 1; i <= n; i++)
		if(F.count(pii(a[i], b[i])))
			printf("%d ", i);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define pii pair<int, int>
#define ll long long

const int	MaxN(300003);
int		a[MaxN], b[MaxN], S[MaxN], top;
map<pii, int>	F;

struct node
{
	int	x, y;
	inline bool operator < (const node &T) const
	{
		return y == T.y ? x > T.x : y < T.y;
	}
}p[MaxN];

struct point
{
	double x, y;
}q[MaxN];

double cross(const point &p1, const point &p2)
{
	return (p1.x - p2.x) / (p1.y  - p2.y);
}

int main()
{
	int	n;
	freopen("slay.in", "r", stdin);
	freopen("slay.out", "w", stdout);
	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d%d", &a[i], &b[i]);
		p[i].x = a[i], p[i].y = b[i];
	}
	sort(p + 1, p + 1 + n);
	q[0].x = 0, q[0].y = 1e18;
	for(int i = 1; i <= n; i++)
	{
		q[i].x = 1e9 / p[i].x;
		q[i].y = 1e9 / p[i].y;
	}
	S[top = 1] = 0;
	for(int i = 1; i <= n; i++)
	{
		if(p[i].y == p[i - 1].y)
			continue;
		while(top > 1 && cross(q[S[top]], q[S[top - 1]]) < cross(q[i], q[S[top]]))
			--top;
		S[++top] = i;
	}
	for(int i = 1; i <= top; i++)
		F[pii(p[S[i]].x, p[S[i]].y)] = 1;
	for(int i = 1; i <= n; i++)
		if(F.count(pii(a[i], b[i])))
			printf("%d ", i);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define pii pair<int, int>
#define ll long long
#define ld long double

const int	MaxN(300003);
int		a[MaxN], b[MaxN], S[MaxN], top;
map<pii, int>	F;

struct node
{
	ld	x, y;
	inline bool operator < (const node &T) const
	{
		return y == T.y ? x > T.x : y < T.y;
	}
}p[MaxN];

ld cross(const node &p1, const node &p2)
{
	if(p2.y == 1e18)
		return (1e9 / p1.x - p2.x) / (1e9 / p1.y  - p2.y);
	return (1e9 / p1.x - 1e9 / p2.x) / (1e9 / p1.y - 1e9 / p2.y);
	//return (ld) ((p2.x - p1.x) * p1.y * p2.y) / ((ld) p1.x * p2.x * (p2.y - p1.y));
}

int main()
{
	int	n;
	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d%d", &a[i], &b[i]);
		p[i].x = a[i], p[i].y = b[i];
	}
	sort(p + 1, p + 1 + n);
	p[0].x = 0, p[0].y = 1e18;
	S[top = 1] = 0;
	for(int i = 1; i <= n; i++)
	{
		if(p[i].y == p[i - 1].y)
			continue;
		while(top > 1 && cross(p[S[top]], p[S[top - 1]]) < cross(p[i], p[S[top]]))
			--top;
		S[++top] = i;
	}
	for(int i = 1; i <= top; i++)
		F[pii(p[S[i]].x, p[S[i]].y)] = 1;
	for(int i = 1; i <= n; i++)
		if(F.count(pii(a[i], b[i])))
			printf("%d ", i);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define pii pair<int, int>
#define ll long long
#define ld long double

const int	MaxN(300003);
int		a[MaxN], b[MaxN], S[MaxN], top;
map<pii, int>	F;

struct node
{
	double	x, y;
	inline bool operator < (const node &T) const
	{
		return x == T.x ? y < T.y : x < T.x;
	}
}p[MaxN];

double cross(const node &p1, const node &p2)
{
	return (p1.x * p2.x * (p2.y - p1.y)) / (p1.y * p2.y * (p2.x - p1.x));
}

int main()
{
	int	n;
	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d%d", &a[i], &b[i]);
		p[i].x = a[i], p[i].y = b[i];
	}
	sort(p + 1, p + 1 + n);
	for(int i = 1; i <= n; i++)
	{
		if(p[i].x == p[i + 1].x)
			continue;
		while(top > 1 && cross(p[S[top - 1]], p[S[top]]) < cross(p[S[top - 1]], p[i]))
			--top;
		S[++top] = i;
	}
	for(int i = 1; i <= top; i++)
		if(i == top || cross(p[S[i]], p[S[i + 1]]) < 0)
			F[pii(p[S[i]].x, p[S[i]].y)] = 1;
	for(int i = 1; i <= n; i++)
		if(F.count(pii(a[i], b[i])))
			printf("%d ", i);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define pii pair<int, int>
#define ll long long

const int	MaxN(300003);
int		a[MaxN], b[MaxN], S[MaxN], top;
map<pii, int>	F;

struct node
{
	int	x, y;
	inline bool operator < (const node &T) const
	{
		return y == T.y ? x > T.x : y < T.y;
	}
}p[MaxN];

double cross(const node &p1, const node &p2)
{
	//return (p1.x - p2.x) / (p1.y  - p2.y);
	//return (1.0 / p1.x - 1.0 / p2.x) / (1.0 / p1.y - 1.0 / p2.y);
	return 1.0 * (p2.x - p1.x) * p1.y * p2.y / (1.0 * p1.x * p2.x * (p2.y - p1.y));
}

int main()
{
	int	n;
	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d%d", &a[i], &b[i]);
		p[i].x = a[i], p[i].y = b[i];
	}
	sort(p + 1, p + 1 + n);
	for(int i = 1; i <= n; i++)
	{
		if(p[i].y == p[i - 1].y)
			continue;
		while(top > 1 && cross(p[S[top]], p[S[top - 1]]) < cross(p[i], p[S[top]]))
			--top;
		S[++top] = i;
	}
	for(int i = 1; i <= top; i++)
		F[pii(p[S[i]].x, p[S[i]].y)] = 1;
	for(int i = 1; i <= n; i++)
		if(F.count(pii(a[i], b[i])))
			printf("%d ", i);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define pii pair<int, int>
#define ll long long

const int	MaxN(300003);
int		a[MaxN], b[MaxN], S[MaxN], top;
map<pii, int>	F;

struct node
{
	int	x, y;
	inline bool operator < (const node &T) const
	{
		return y == T.y ? x > T.x : y < T.y;
	}
}p[MaxN];

struct point
{
	double x, y;
}q[MaxN];

double cross(const point &p1, const point &p2)
{
	return (p1.x - p2.x) / (p1.y  - p2.y);
}

int main()
{
	int	n;
	freopen("slay.in", "r", stdin);
	freopen("slay.out", "w", stdout);
	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d%d", &a[i], &b[i]);
		p[i].x = a[i], p[i].y = b[i];
	}
	sort(p + 1, p + 1 + n);
	q[0].x = 0, q[0].y = 1e18;
	for(int i = 1; i <= n; i++)
	{
		q[i].x = 1e9 / p[i].x;
		q[i].y = 1e9 / p[i].y;
	}
	S[top = 1] = 0;
	for(int i = 1; i <= n; i++)
	{
		if(p[i].y == p[i - 1].y)
			continue;
		while(top > 1 && cross(q[S[top]], q[S[top - 1]]) < cross(q[i], q[S[top]]))
			--top;
		S[++top] = i;
	}
	for(int i = 1; i <= top; i++)
		F[pii(p[S[i]].x, p[S[i]].y)] = 1;
	for(int i = 1; i <= n; i++)
		if(F.count(pii(a[i], b[i])))
			printf("%d ", i);
}


#include <bits/stdc++.h>
using namespace std;

#define pii pair<int, int>
#define ll long long
#define ld long double

const int	MaxN(300003);
int		a[MaxN], b[MaxN], S[MaxN], top;
map<pii, int>	F;

struct node
{
	ld	x, y;
	inline bool operator < (const node &T) const
	{
		return y == T.y ? x > T.x : y < T.y;
	}
}p[MaxN];

ld cross(const node &p1, const node &p2)
{
	if(p2.y == 1e18)
		return (1.0 / p1.x - p2.x) / (1.0 / p1.y  - p2.y);
	return (1e9 / p1.x - 1e9 / p2.x) / (1e9 / p1.y - 1e9 / p2.y);
	//return (ld) ((p2.x - p1.x) * p1.y * p2.y) / ((ld) p1.x * p2.x * (p2.y - p1.y));
}

int main()
{
	int	n;
	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d%d", &a[i], &b[i]);
		p[i].x = a[i], p[i].y = b[i];
	}
	sort(p + 1, p + 1 + n);
	p[0].x = 0, p[0].y = 1e18;
	S[top = 1] = 0;
	for(int i = 1; i <= n; i++)
	{
		if(p[i].y == p[i - 1].y)
			continue;
		while(top > 1 && cross(p[S[top]], p[S[top - 1]]) < cross(p[i], p[S[top]]))
			--top;
		S[++top] = i;
	}
	for(int i = 1; i <= top; i++)
		F[pii(p[S[i]].x, p[S[i]].y)] = 1;
	for(int i = 1; i <= n; i++)
		if(F.count(pii(a[i], b[i])))
			printf("%d ", i);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#define pii pair<int, int>
#define ll long long
#define ld long double

const int	MaxN(300003);
int		a[MaxN], b[MaxN], S[MaxN], top;
map<pii, int>	F;

struct node
{
	ld	x, y;
	inline bool operator < (const node &T) const
	{
		return y == T.y ? x > T.x : y < T.y;
	}
}p[MaxN];

ld cross(const node &p1, const node &p2)
{
	//return (p1.x - p2.x) / (p1.y  - p2.y);
	return (1e9 / p1.x - 1e9 / p2.x) / (1e9 / p1.y - 1e9 / p2.y);
	//return (ld) ((p2.x - p1.x) * p1.y * p2.y) / ((ld) p1.x * p2.x * (p2.y - p1.y));
}

int main()
{
	int	n;
	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d%d", &a[i], &b[i]);
		p[i].x = a[i], p[i].y = b[i];
	}
	sort(p + 1, p + 1 + n);
	p[0].x = 1e19, p[0].y = 0.01;
	S[top = 1] = 0;
	for(int i = 1; i <= n; i++)
	{
		if(p[i].y == p[i - 1].y)
			continue;
		while(top > 1 && cross(p[S[top]], p[S[top - 1]]) < cross(p[i], p[S[top]]))
			--top;
		S[++top] = i;
	}
	for(int i = 1; i <= top; i++)
		F[pii(p[S[i]].x, p[S[i]].y)] = 1;
	for(int i = 1; i <= n; i++)
		if(F.count(pii(a[i], b[i])))
			printf("%d ", i);
	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			temp.u = u;
			ll.push_back(temp);
			break;
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				//ll.pop_back();
				break;
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] < lastb||b[u]==lastb&&a[u]!=lasta)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] < lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( t.dif<temp.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg t){
		return (double)y*t.x < (double)x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];

	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				if (N == 200000)
					cout << temp.dif.x << " " << temp.dif.y << " " << t.dif.x<<" " << t.dif.y << endl;
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg t){
		return (double)y*t.x < (double)x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];

	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		t = ll.back();
		if (a[u] == a[t.u] && b[u] == b[t.u]){
			t.u = u;
			ll.push_back(t);
		}
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] < lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (x != y)
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			++xxx;
			if (xxx>1e6)
			{
				printf("123");
				exit(0);
			}
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (t.dif < temp.dif){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (x != y)
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (t.dif < temp.dif){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] < lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (x != y)
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (t.dif < temp.dif){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg t){
		return (double)y*t.x < (double)x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];

	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] < lastb||b[u]==lastb&&a[u]!=lasta)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				//ll.pop_back();
				break;
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];

	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				if (N == 200000)
					cout << temp.dif.x << " " << temp.dif.y << " " << t.dif.x<<" " << t.dif.y << endl;
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	if (N == 200000)
		cout << lasta << " " << lastb << endl;
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
char p[1000005]="ababcdababababc";
int nxt[1000005] = {};
char ncft[1000005] = {};
int xs[1000005];
int main()
{
	int i, j;
	int n, m;
	cin >> n >> m;
	scanf("%s", p);
	for (i = 0; i < m; ++i){
		scanf("%d", xs + i);
	}
	int len = strlen(p);
	nxt[0] = 0;
	j = 0;
	for (i = 1; i < len; ++i){
		nxt[i] = j;
		if (p[j] == p[i]){
			++j;
		}
		else{
			j = nxt[j];
			if (p[j] == p[i])
				++j;

		}
	}
	ncft[0] = 1;
	nxt[i] = j;
	j = nxt[len];
	while (j > 0){
		ncft[len-j] = 1;
		j = nxt[j];
	}
	int s = len*m;
	for (i = 1; i < m; ++i){
		if (xs[i] + len>n){
			printf("0\n");
			exit(0);
		}
		if (xs[i] - xs[i - 1] < len){
			if (!ncft[xs[i] - xs[i - 1]]){
				printf("0\n");
				exit(0);
			}
			else{
				s -=len - xs[i] + xs[i - 1];
			}
		}
	}
	long long res = 1;
	for (i = s; i < n; ++i){
		res = res * 26 % 1000000007;
	}
	printf("%d", res);
	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (x != y)
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (t.dif < temp.dif){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
				if (ll.empty()){
					cout << temp.dif.x << " " << temp.dif.y;
					exit(0);
				}
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] < lastb||b[u]==lastb&&a[u]!=lasta)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			temp.u = u;
			cout << u << " " << a[u] << " " << b[u] << endl;
			ll.push_back(temp);
			break;
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				//ll.pop_back();
				break;
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] < lastb||b[u]==lastb&&a[u]!=lasta)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				//ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] < lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			temp.u = u;
			ll.push_back(temp);
			break;
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				//ll.pop_back();
				break;
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (x != y)
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	if (N == 200000){
		exit(0);
	}
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (t.dif < temp.dif){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (temp.dif<t.dif ){
				ll.pop_back();
				break;
			}
			else{

				temp.u = u;
				ll.push_back(temp);
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (x != y)
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (t.dif < temp.dif){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
				if (ll.empty()){
					printf("123");
					exit(0);
				}
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] < lastb||b[u]==lastb&&a[u]!=lasta)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			temp.u = u;
			ll.push_back(temp);
			break;
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				//ll.pop_back();
				break;
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] < lastb||b[u]==lastb&&a[u]!=lasta)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			temp.u = u;
			if(N==200000)
			cout << u << " " << a[u] << " " << b[u] << endl;
			ll.push_back(temp);
			break;
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				//ll.pop_back();
				break;
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (x != y)
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			++xxx;
			if (xxx>1e7)
			{
				printf("123");
				exit(0);
			}
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (t.dif < temp.dif){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (t.dif < temp.dif){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (a[x] != a[y])
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	int lasta;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	lasta = a[index[0]];

	int xxx = 0;
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		lasta = a[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (!( temp.dif<t.dif)){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				if (N == 200000)
					cout << lasta << " " << lastb << endl;
				ll.pop_back();
			}
		}
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (x != y)
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (t.dif < temp.dif){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	if (N == 200000)
		exit(0);
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <fstream>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <list>
#include <queue>
#include <string>
#include <math.h>
#include <vector>
#include <set>
#include <map>
using namespace std;
struct Freg{
	long long y, x;
	bool operator <(Freg &t){
		return y*t.x < x*t.y;
	}
};
struct  Node
{
	int u;
	Freg dif;
};
int N;
int a[200005];
int b[200005];
int index[200005];
list <Node> ll;
int cmp(int x, int y){
	if (x != y)
		return a[x]>a[y];
	else
		return b[x] > b[y];
}
int cmp2;
Freg diff(int former, int latter){
	Freg res;
	res.y = (long long)b[former] * b[latter] * (a[former] - a[latter]);
	res.x = (long long)a[former] * a[latter] * (b[latter] - b[former]);
	return res;
}
int main()
{
	int i, j;
	int u;
	int lastb;
	Node temp;
	Node t;
	cin >> N;
	for (i = 0; i < N; ++i){
		scanf("%d%d", &a[i], &b[i]);
		index[i] = i;
	}
	sort(index, index + N, cmp);
	temp.u = index[0];
	temp.dif.y = 0;
	temp.dif.x = 1;
	ll.push_back(temp);
	lastb = b[index[0]];
	for (i = 1; i < N; ++i){
		u = index[i];
		if (b[u] <= lastb)
			continue;
		lastb = b[u];
		while (1){
			t = ll.back();
			temp.dif = diff(t.u, u);
			if (t.dif < temp.dif){
				temp.u = u;
				ll.push_back(temp);
				break;
			}
			else{
				ll.pop_back();
			}
		}
	}
	for (i = 0; i < 200000; ++i){
		ll.push_back(temp);
	}
	list  <Node>::iterator it, end;
	it = ll.begin();
	end = ll.end();
	i = 0;
	N = ll.size();
	for (; it != end; ++it){
		index[i++] = it->u;
	}
	sort(index, index + N);
	printf("%d", index[0]+1);
	for (i = 1; i < N; ++i)
		printf(" %d", index[i]+1);
	printf("\n");

	return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
using namespace std;
const double eps = 1e-5;
struct pdd { double x, y; int id; };
double cross(const pdd &a, const pdd &b)
{
	return a.x*b.y - a.y*b.x;
}
double dot(const pdd &a, const pdd &b)
{
	return a.x*b.x + a.y*b.y;
}
pdd operator -(const pdd &a, const pdd &b)
{
	return{ a.x - b.x,a.y - b.y };
}
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pdd> v;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		v.push_back({ 1.0 / x,1.0 / y,i + 1 });
	}
	vector<pdd> hull;
	if (n <= 3) hull = v;
	else
	{
		swap(v[0], *max_element(v.begin(), v.end(), [](const pdd &a, const pdd &b)
		{
			return a.y < b.y || a.y == b.y&&a.x < b.x;
		}));
		sort(v.begin() + 1, v.end(), [&v](const pdd &a, const pdd &b)
		{
			double t = cross(a - v[0], b - v[0]);
			return t == 0 ? dot(a - v[0], a - v[0]) < dot(b - v[0], b - v[0]) : t > 0;
		});
		hull.push_back(v[0]);
		hull.push_back(v[1]);
		for (int i = 2; i < n; i++)
		{
			while (hull.size() > 2 && cross(hull[hull.size() - 1] - hull[hull.size() - 2], v[i] - hull[hull.size() - 2]) < eps) hull.pop_back();
			hull.push_back(v[i]);
		}
	}
	pdd &left = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.x < b.x || a.x == b.x&&a.y < b.y;
	});
	pdd &bottom = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.y < b.y || a.y == b.y&&a.x < b.x;
	});
	vector<pdd> res;
	copy_if(hull.begin(), hull.end(), back_insert_iterator<vector<pdd>>(res), [&left, &bottom](const pdd &a)
	{
		return dot(left - bottom, a - bottom) > -eps && cross(left - bottom, a - bottom) > -eps;
	});
	sort(res.begin(), res.end(), [](const pdd &a, const pdd &b)
	{
		return a.id < b.id;
	});
	for (pdd &a : res) cout << a.id << ' ';
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
using namespace std;
const long double eps = 1e-12;
struct pdd { long double x, y; int id; };
long double cross(const pdd &a, const pdd &b)
{
	return a.x*b.y - a.y*b.x;
}
long double dot(const pdd &a, const pdd &b)
{
	return a.x*b.x + a.y*b.y;
}
pdd operator -(const pdd &a, const pdd &b)
{
	return{ a.x - b.x,a.y - b.y,0 };
}
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pdd> v;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		v.push_back({ (long double)1 / x,(long double)1 / y,i + 1 });
	}
	vector<pdd> hull;
	if (n <= 3) hull = v;
	else
	{
		swap(v[0], *min_element(v.begin(), v.end(), [](const pdd &a, const pdd &b)
		{
			return a.y < b.y || a.y == b.y&&a.x < b.x;
		}));
		sort(v.begin() + 1, v.end(), [&v](const pdd &a, const pdd &b)
		{
			long double t = cross(a - v[0], b - v[0]);
			return t > -eps&&t < eps ? dot(a - v[0], a - v[0]) < dot(b - v[0], b - v[0]) : t > eps;
		});
		hull.push_back(v[0]);
		hull.push_back(v[1]);
		for (int i = 2; i < n; i++)
		{
			while (hull.size() > 2 && cross(hull[hull.size() - 1] - hull[hull.size() - 2], v[i] - hull[hull.size() - 2]) < -eps)
				hull.pop_back();
			hull.push_back(v[i]);
		}
	}
	pdd &left = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.x < b.x || a.x == b.x&&a.y < b.y;
	});
	pdd &bottom = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.y < b.y || a.y == b.y&&a.x < b.x;
	});
	vector<pdd> res;
	copy_if(hull.begin(), hull.end(), back_insert_iterator<vector<pdd>>(res), [&left, &bottom](const pdd &a)
	{
		return dot(left - bottom, a - bottom) > -eps && cross(left - bottom, a - bottom) > -eps;
	});
	sort(res.begin(), res.end(), [](const pdd &a, const pdd &b)
	{
		return a.id < b.id;
	});
	for (pdd &a : res) cout << a.id << ' ';
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
#include <map>
using namespace std;
struct pll
{
	long long x, y;
};
bool operator <(const pll &a, const pll &b)
{
	return a.x < b.x || a.x == b.x&&a.y < b.y;
}
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pll> v;
	map<pll, vector<int>> m;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		auto p = pll{ x,y };
		if (m[p].size() == 0) v.push_back(p);
		m[p].push_back(i + 1);
	}
	swap(v[0], *min_element(v.begin(), v.end(), [](const pll &a, const pll &b)
	{
		return a.y > b.y || a.y == b.y&&a.x > b.x;
	}));
	sort(v.begin() + 1, v.end(), [&v](const pll &a, const pll &b)
	{
		long long t = (v[0].x - a.x)*(v[0].y - b.y)*a.y*b.x - (v[0].y - a.y)*(v[0].x - b.x)*a.x*b.y;
		return t == 0
			? pow(1.0 / a.x - 1.0 / v[0].x, 2) + pow(1.0 / a.y - 1.0 / v[0].y, 2)
				> pow(1.0 / b.x - 1.0 / v[0].x, 2) + pow(1.0 / b.y - 1.0 / v[0].y, 2)
			: t > 0;
	});
	vector<pll> p;
	auto l = min_element(v.begin(), v.end(), [](const pll &a, const pll &b)
	{
		return a.x > b.x || a.x == b.x&&a.y > b.y;
	});
	if (l != v.begin()) copy(l, v.end(), back_insert_iterator<vector<pll>>(p));
	vector<pll> hull;
	if (p.size() <= 3) hull = p;
	else
	{
		hull.push_back(p[0]);
		hull.push_back(p[1]);
		for (int i = 2; i < p.size(); i++)
		{
			while (hull.size() > 2)
			{
				pll &a = hull[hull.size() - 1], &b = hull[hull.size() - 2];
				if ((b.x - a.x)*(b.y - p[i].y)*a.y*p[i].x < (b.y - a.y)*(b.x - p[i].x)*a.x*p[i].y)
					hull.pop_back();
				else break;
			}
			hull.push_back(p[i]);
		}
	}
	hull.push_back(v[0]);
	vector<int> res;
	for (auto it = hull.begin(); it != hull.end(); it++)
		copy(m[*it].begin(), m[*it].end(), back_insert_iterator<vector<int>>(res));
	sort(res.begin(), res.end());
	copy(res.begin(), res.end(), ostream_iterator<int>(cout, " "));
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
#include <map>
#include <functional>
using namespace std;
struct pll
{
	long long x, y;
};
bool operator <(const pll &a, const pll &b)
{
	return a.x < b.x || a.x == b.x&&a.y < b.y;
}
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pll> v;
	map<pll, vector<int>> m;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		auto p = pll{ x,y };
		if (m[p].size() == 0) v.push_back(p);
		m[p].push_back(i + 1);
	}
	swap(v[0], *min_element(v.begin(), v.end(), [](const pll &a, const pll &b)
	{
		return a.y > b.y || a.y == b.y&&a.x > b.x;
	}));
	sort(v.begin() + 1, v.end(), [&v](const pll &a, const pll &b)
	{
		long long t = (v[0].x - a.x)*(v[0].y - b.y)*a.y*b.x - (v[0].y - a.y)*(v[0].x - b.x)*a.x*b.y;
		return t == 0
			? pow(1.0 / a.x - 1.0 / v[0].x, 2) + pow(1.0 / a.y - 1.0 / v[0].y, 2)
				> pow(1.0 / b.x - 1.0 / v[0].x, 2) + pow(1.0 / b.y - 1.0 / v[0].y, 2)
			: t > 0;
	});
	vector<pll> hull;
	if (v.size() <= 3) hull = v;
	else
	{
		hull.push_back(v[0]);
		hull.push_back(v[1]);
		for (int i = 2; i < v.size(); i++)
		{
			while (hull.size() > 2)
			{
				pll &a = hull[hull.size() - 1], &b = hull[hull.size() - 2];
				if ((b.x - a.x)*(b.y - v[i].y)*a.y*v[i].x < (b.y - a.y)*(b.x - v[i].x)*a.x*v[i].y)
					hull.pop_back();
				else break;
			}
			hull.push_back(v[i]);
		}
	}
	vector<int> res;
	auto l = min_element(hull.begin(), hull.end(), [](const pll &a, const pll &b)
	{
		return a.x > b.x || a.x == b.x&&a.y > b.y;
	});
	res.insert(res.end(), m[hull[0]].begin(), m[hull[0]].end());
	if (l != hull.begin()) for (auto it = l; it != hull.end(); it++) res.insert(res.end(), m[*it].begin(), m[*it].end());
	sort(res.begin(), res.end());
	copy(res.begin(), res.end(), ostream_iterator<int>(cout, " "));
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
using namespace std;
struct pdd { long long x, y; int id; };
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pdd> v;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		v.push_back({ x,y,i + 1 });
	}
	swap(v[0], *min_element(v.begin(), v.end(), [](const pdd &a, const pdd &b)
	{
		return a.y > b.y || a.y == b.y&&a.x > b.x;
	}));
	sort(v.begin() + 1, v.end(), [&v](const pdd &a, const pdd &b)
	{
		return (v[0].x - a.x)*(v[0].y - b.y)*a.y*b.x > (v[0].y - a.y)*(v[0].x - b.x)*a.x*b.y;
	});
	vector<pdd> hull;
	if (n <= 3) hull = v;
	else
	{
		hull.push_back(v[0]);
		hull.push_back(v[1]);
		for (int i = 2; i < n; i++)
		{
			while (hull.size() > 2)
			{
				pdd &a = hull[hull.size() - 1], &b = hull[hull.size() - 2];
				if ((b.x - a.x)*(b.y - v[i].y)*a.y*v[i].x <= (b.y - a.y)*(b.x - v[i].x)*a.x*v[i].y)
					hull.pop_back();
				else break;
			}
			hull.push_back(v[i]);
		}
	}
	vector<pdd> res;
	auto l = min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.x > b.x || a.x == b.x&&a.y > b.y;
	});
	if (l != hull.begin()) res.push_back(hull[0]);;
	copy(l, hull.end(), back_insert_iterator<vector<pdd>>(res));
	sort(res.begin(), res.end(), [](const pdd &a, const pdd &b)
	{
		return a.id < b.id;
	});
	for (pdd &a : res) cout << a.id << ' ';
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
const long double eps = 1e-30;
using namespace std;
struct pdd { long double x, y; int id; };
long double cross(const pdd &a, const pdd &b)
{
	return a.x*b.y - a.y*b.x;
}
long double dot(const pdd &a, const pdd &b)
{
	return a.x*b.x + a.y*b.y;
}
pdd sub(const pdd &a, const pdd &b)
{
	return{ a.x - b.x,a.y - b.y,0 };
}
pdd operator -(const pdd &a, const pdd &b)
{
	return sub(a, b);
}
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pdd> v;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		v.push_back({ 1.0 / x,1.0 / y,i + 1 });
	}
	vector<pdd> hull;
	if (n <= 3) hull = v;
	else
	{
		swap(v[0], *min_element(v.begin(), v.end(), [](const pdd &a, const pdd &b)
		{
			return a.y < b.y || a.y == b.y&&a.x < b.x;
		}));
		sort(v.begin() + 1, v.end(), [&v](const pdd &a, const pdd &b)
		{
			long double t = cross(a - v[0], b - v[0]);
			return t > -eps&&t < eps ? dot(a - v[0], a - v[0]) < dot(b - v[0], b - v[0]) : t > eps;
		});
		hull.push_back(v[0]);
		hull.push_back(v[1]);
		for (int i = 2; i < n; i++)
		{
			while (hull.size() > 2 && cross(hull[hull.size() - 1] - hull[hull.size() - 2], v[i] - hull[hull.size() - 2]) < -eps) hull.pop_back();
			hull.push_back(v[i]);
		}
	}
	pdd &left = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.x < b.x || a.x == b.x&&a.y < b.y;
	});
	pdd &bottom = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.y < b.y || a.y == b.y&&a.x < b.x;
	});
	vector<pdd> res;
	copy_if(hull.begin(), hull.end(), back_insert_iterator<vector<pdd>>(res), [&left, &bottom](const pdd &a)
	{
		return dot(left - bottom, a - bottom) > -eps && cross(left - bottom, a - bottom) > -eps;
	});
	sort(res.begin(), res.end(), [](const pdd &a, const pdd &b)
	{
		return a.id < b.id;
	});
	for (pdd &a : res) cout << a.id << ' ';
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
using namespace std;
const long double eps = 1e-22;
struct pdd { long double x, y; int id; };
long double cross(const pdd &a, const pdd &b)
{
	return a.x*b.y - a.y*b.x;
}
long double dot(const pdd &a, const pdd &b)
{
	return a.x*b.x + a.y*b.y;
}
pdd operator -(const pdd &a, const pdd &b)
{
	return{ a.x - b.x,a.y - b.y,0 };
}
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pdd> v;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		v.push_back({ (long double)1 / x,(long double)1 / y,i + 1 });
	}
	vector<pdd> hull;
	if (n <= 3) hull = v;
	else
	{
		swap(v[0], *min_element(v.begin(), v.end(), [](const pdd &a, const pdd &b)
		{
			return a.y < b.y || a.y == b.y&&a.x < b.x;
		}));
		sort(v.begin() + 1, v.end(), [&v](const pdd &a, const pdd &b)
		{
			long double t = cross(a - v[0], b - v[0]);
			return t > -eps&&t < eps ? dot(a - v[0], a - v[0]) < dot(b - v[0], b - v[0]) : t > eps;
		});
		hull.push_back(v[0]);
		hull.push_back(v[1]);
		for (int i = 2; i < n; i++)
		{
			while (hull.size() > 2 && cross(hull[hull.size() - 1] - hull[hull.size() - 2], v[i] - hull[hull.size() - 2]) < -eps)
				hull.pop_back();
			hull.push_back(v[i]);
		}
	}
	pdd &left = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.x < b.x || a.x == b.x&&a.y < b.y;
	});
	pdd &bottom = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.y < b.y || a.y == b.y&&a.x < b.x;
	});
	vector<pdd> res;
	copy_if(hull.begin(), hull.end(), back_insert_iterator<vector<pdd>>(res), [&left, &bottom](const pdd &a)
	{
		return dot(left - bottom, a - bottom) > -eps && cross(left - bottom, a - bottom) > -eps;
	});
	sort(res.begin(), res.end(), [](const pdd &a, const pdd &b)
	{
		return a.id < b.id;
	});
	for (pdd &a : res) cout << a.id << ' ';
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
using namespace std;
const double eps = 1e-22;
struct pdd { long double x, y; int id; };
long double cross(const pdd &a, const pdd &b)
{
	return a.x*b.y - a.y*b.x;
}
long double dot(const pdd &a, const pdd &b)
{
	return a.x*b.x + a.y*b.y;
}
pdd operator -(const pdd &a, const pdd &b)
{
	return{ a.x - b.x,a.y - b.y };
}
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pdd> v;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		v.push_back({ 1.0 / x,1.0 / y,i + 1 });
	}
	vector<pdd> hull;
	if (n <= 3) hull = v;
	else
	{
		swap(v[0], *max_element(v.begin(), v.end(), [](const pdd &a, const pdd &b)
		{
			return a.y < b.y || a.y == b.y&&a.x < b.x;
		}));
		sort(v.begin() + 1, v.end(), [&v](const pdd &a, const pdd &b)
		{
			long double t = cross(a - v[0], b - v[0]);
			return t < eps&&t > -eps ? dot(a - v[0], a - v[0]) < dot(b - v[0], b - v[0]) : t > eps;
		});
		hull.push_back(v[0]);
		hull.push_back(v[1]);
		for (int i = 2; i < n; i++)
		{
			while (hull.size() > 2 && cross(hull[hull.size() - 1] - hull[hull.size() - 2], v[i] - hull[hull.size() - 2]) <= 0) hull.pop_back();
			hull.push_back(v[i]);
		}
	}
	pdd &left = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.x < b.x || a.x == b.x&&a.y < b.y;
	});
	pdd &bottom = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.y < b.y || a.y == b.y&&a.x < b.x;
	});
	vector<pdd> res;
	copy_if(hull.begin(), hull.end(), back_insert_iterator<vector<pdd>>(res), [&left, &bottom](const pdd &a)
	{
		return dot(left - bottom, a - bottom) > -eps && cross(left - bottom, a - bottom) > -eps;
	});
	sort(res.begin(), res.end(), [](const pdd &a, const pdd &b)
	{
		return a.id < b.id;
	});
	for (pdd &a : res) cout << a.id << ' ';
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
using namespace std;
const long double eps = 1e-40;
struct pdd { long double x, y; int id; };
long double cross(const pdd &a, const pdd &b)
{
	return a.x*b.y - a.y*b.x;
}
long double dot(const pdd &a, const pdd &b)
{
	return a.x*b.x + a.y*b.y;
}
pdd operator -(const pdd &a, const pdd &b)
{
	return{ a.x - b.x,a.y - b.y,0 };
}
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pdd> v;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		v.push_back({ 1.0 / x,1.0 / y,i + 1 });
	}
	vector<pdd> hull;
	if (n <= 3) hull = v;
	else
	{
		swap(v[0], *min_element(v.begin(), v.end(), [](const pdd &a, const pdd &b)
		{
			return a.y < b.y || a.y == b.y&&a.x < b.x;
		}));
		sort(v.begin() + 1, v.end(), [&v](const pdd &a, const pdd &b)
		{
			long double t = cross(a - v[0], b - v[0]);
			return t > -eps&&t < eps ? dot(a - v[0], a - v[0]) < dot(b - v[0], b - v[0]) : t > eps;
		});
		hull.push_back(v[0]);
		hull.push_back(v[1]);
		for (int i = 2; i < n; i++)
		{
			while (hull.size() > 2 && cross(hull[hull.size() - 1] - hull[hull.size() - 2], v[i] - hull[hull.size() - 2]) < -eps)
				hull.pop_back();
			hull.push_back(v[i]);
		}
	}
	pdd &left = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.x < b.x || a.x == b.x&&a.y < b.y;
	});
	pdd &bottom = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.y < b.y || a.y == b.y&&a.x < b.x;
	});
	vector<pdd> res;
	copy_if(hull.begin(), hull.end(), back_insert_iterator<vector<pdd>>(res), [&left, &bottom](const pdd &a)
	{
		return dot(left - bottom, a - bottom) > -eps && cross(left - bottom, a - bottom) > -eps;
	});
	sort(res.begin(), res.end(), [](const pdd &a, const pdd &b)
	{
		return a.id < b.id;
	});
	for (pdd &a : res) cout << a.id << ' ';
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
using namespace std;
const double eps = 1e-5;
struct pdd { double x, y; int id; };
double cross(const pdd &a, const pdd &b)
{
	return a.x*b.y - a.y*b.x;
}
double dot(const pdd &a, const pdd &b)
{
	return a.x*b.x + a.y*b.y;
}
pdd operator -(const pdd &a, const pdd &b)
{
	return{ a.x - b.x,a.y - b.y };
}
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pdd> v;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		v.push_back({ 1.0 / x,1.0 / y,i + 1 });
	}
	vector<pdd> hull;
	if (n <= 3) hull = v;
	else
	{
		swap(v[0], *max_element(v.begin(), v.end(), [](const pdd &a, const pdd &b)
		{
			return a.y < b.y || a.y == b.y&&a.x < b.x;
		}));
		sort(v.begin() + 1, v.end(), [&v](const pdd &a, const pdd &b)
		{
			double t = cross(a - v[0], b - v[0]);
			return t == 0 ? dot(a - v[0], a - v[0]) < dot(b - v[0], b - v[0]) : t > 0;
		});
		hull.push_back(v[0]);
		hull.push_back(v[1]);
		for (int i = 2; i < n; i++)
		{
			while (hull.size() > 2 && cross(hull[hull.size() - 1] - hull[hull.size() - 2], v[i] - hull[hull.size() - 2]) < eps) hull.pop_back();
			hull.push_back(v[i]);
		}
	}
	pdd &left = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.x < b.x || a.x == b.x&&a.y < b.y;
	});
	pdd &bottom = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.y < b.y || a.y == b.y&&a.x < b.x;
	});
	vector<pdd> res;
	copy_if(hull.begin(), hull.end(), back_insert_iterator<vector<pdd>>(res), [&left, &bottom](const pdd &a)
	{
		return dot(left - bottom, a - bottom) > eps && cross(left - bottom, a - bottom) > eps;
	});
	sort(res.begin(), res.end(), [](const pdd &a, const pdd &b)
	{
		return a.id < b.id;
	});
	for (pdd &a : res) cout << a.id << ' ';
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
#include <cmath>
const double eps = 1e-8;
using namespace std;
struct pdd { double x, y; int id; };
double cross(const pdd &a, const pdd &b)
{
	return a.x*b.y - a.y*b.x;
}
double dot(const pdd &a, const pdd &b)
{
	return a.x*b.x + a.y*b.y;
}
pdd sub(const pdd &a, const pdd &b)
{
	return{ a.x - b.x,a.y - b.y,0 };
}
pdd operator -(const pdd &a, const pdd &b)
{
	return sub(a, b);
}
int main()
{
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<pdd> v;
	for (int i = 0; i < n; i++)
	{
		int x, y;
		cin >> x >> y;
		v.push_back({ 1.0 / x,1.0 / y,i + 1 });
	}
	vector<pdd> hull;
	if (n <= 3) hull = v;
	else
	{
		swap(v[0], *max_element(v.begin(), v.end(), [](const pdd &a, const pdd &b)
		{
			return a.y < b.y || a.y == b.y&&a.x < b.x;
		}));
		sort(v.begin() + 1, v.end(), [&v](const pdd &a, const pdd &b)
		{
			double t = cross(a - v[0], b - v[0]);
			return t == 0 ? dot(a - v[0], a - v[0]) < dot(b - v[0], b - v[0]) : t > 0;
		});
		hull.push_back(v[0]);
		hull.push_back(v[1]);
		for (int i = 2; i < n; i++)
		{
			while (hull.size() > 2 && cross(hull[hull.size() - 1] - hull[hull.size() - 2], v[i] - hull[hull.size() - 2]) < -eps) hull.pop_back();
			hull.push_back(v[i]);
		}
	}
	pdd &left = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.x < b.x || a.x == b.x&&a.y < b.y;
	});
	pdd &bottom = *min_element(hull.begin(), hull.end(), [](const pdd &a, const pdd &b)
	{
		return a.y < b.y || a.y == b.y&&a.x < b.x;
	});
	vector<pdd> res;
	copy_if(hull.begin(), hull.end(), back_insert_iterator<vector<pdd>>(res), [&left, &bottom](const pdd &a)
	{
		return dot(left - bottom, a - bottom) > -eps && cross(left - bottom, a - bottom) > -eps;
	});
	sort(res.begin(), res.end(), [](const pdd &a, const pdd &b)
	{
		return a.id < b.id;
	});
	for (pdd &a : res) cout << a.id << ' ';
}