#include<bits/stdc++.h>
using namespace std;
#define ll pair<long long, long long>
#define dll pair<ll,long long>
#define fi first
#define se second
const long long inf = 1e18;
const int maxn = 10+1e3;
long long n,d,x,y;
vector<dll> g,tam;
bool cmp(dll a, dll b)
 {
 	if (a.fi.fi==b.fi.fi) return (a.fi.se<b.fi.se);
 	return (a.fi.fi<b.fi.fi);
 }
bool cmp1(dll a, dll b)
 {
 	return (a.se<b.se);
 }
long long cal(ll a, ll b, ll c)
 {
 	return (b.fi-a.fi)*(c.se-b.se)-(c.fi-b.fi)*(b.se-a.se);
 }
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL); cout.tie(NULL);
	freopen("TREE.INP","r",stdin);
	freopen("TREE.OUT","w",stdout);
	cin>>n;
	for (int i=1; i<=n; i++)
	 {
	 	cin>>x>>y;
	 	g.push_back({{x,y},i});
	 }
	sort (g.begin(), g.end(), cmp);
	int d=0;
	while (d<g.size()-1) 
	 {
		if (g[d].fi.fi==g[d+1].fi.fi&&g[d].fi.se==g[d+1].fi.se) g.erase(g.begin()+d);
			else d++;
	 }
	tam.push_back(g[0]);
	for (int i=1; i<n; i++) 
	 {
		while (tam.size()>=2&&cal(tam[tam.size()-2].fi, tam.back().fi, g[i].fi)>0) tam.pop_back();
		tam.push_back(g[i]);
	 }
	for (int i=n-2; i>=0; i--) 
	 {
		while (tam.size()>=2&&cal(tam[tam.size()-2].fi, tam.back().fi, g[i].fi)>0) tam.pop_back();
		tam.push_back(g[i]);
	 }
	d=1;
	while (d<tam.size()-1) 
		if (cal(tam[d-1].fi, tam[d].fi, tam[d+1].fi)==0) tam.erase(tam.begin()+d);
			else d++;
	if (n>1) tam.pop_back();
	sort(tam.begin(),tam.end(),cmp1);
	cout<<tam.size()<<endl;
	for (int i=0; i<=tam.size()-1; i++) cout<<tam[i].se<<" ";
}
