/**
* Created by Zlobober on 14.04.15.
*/
import java.io.*;
import java.util.*;
public class TaskC {
private final InputReader reader;
private final OutputWriter writer;
public TaskC(InputReader reader, OutputWriter writer) {
this.reader = reader;
this.writer = writer;
}
public static void main
(String[] args
) { InputReader reader
= new InputReader
(System.
in); OutputWriter writer
= new OutputWriter
(System.
out); new TaskC(reader, writer).run();
writer.writer.flush();
}
int[] X, Y;
class Pair implements Comparable<Pair> {
int x, y;
Pair(int x, int y) {
this.x = x;
this.y = y;
}
@Override
public int compareTo(Pair other) {
if (this.x != other.x)
return Integer.
compare(this.
x, other.
x); return Integer.
compare(this.
y, other.
y); }
}
public void run() {
int n = reader.nextInt();
X = new int[n];
Y = new int[n];
TreeSet<Pair> used = new TreeSet<Pair>();
for (int i = 0; i < n; i++) {
X[i] = reader.nextInt();
Y[i] = reader.nextInt();
}
int apt = 0;
for (int i = 0; i < n; i++) {
if (used.contains(new Pair(X[i], Y[i])))
continue;
else {
A[apt++] = i;
used.add(new Pair(X[i], Y[i]));
}
}
int pos = 0;
int neg = 0;
for (int i = 1; i < A.length; i++) {
if (Y[A[i]] > Y[A[pos]] || (Y[A[i]] == Y[A[pos]] && X[A[i]] > X[A[pos]]))
pos = i;
if (X[A[i]] > X[A[neg]] || (X[A[i]] == X[A[neg]] && Y[A[i]] > Y[A[neg]]))
neg = i;
}
neg = A[neg];
int t = A[0];
A[0] = A[pos];
A[pos] = t;
pos = A[0];
Arrays.
sort(A,
1, A.
length,
new Comparator
<Integer
>() { @Override
long v = vec(finalA[0], a, b);
if (v != 0)
return Long.
compare(v,
0); else {
int da = (X[a] - X[finalA[0]]) * (X[a] - X[finalA[0]]) + (Y[a] - Y[finalA[0]]) * (Y[a] - Y[finalA[0]]);
int db = (X[b] - X[finalA[0]]) * (X[b] - X[finalA[0]]) + (Y[b] - Y[finalA[0]]) * (Y[b] - Y[finalA[0]]);
return Long.
compare(da, db
); }
}
});
int[] H = new int[A.length];
int pt = 0;
H[pt++] = A[0];
if (pos != neg) {
for (int i = 1; i < A.length; i++) {
int p = A[i];
while (true) {
if (pt < 2)
break;
int a = H[pt - 2];
int b = H[pt - 1];
long v = vec(a, b, p);
if (v > 0)
--pt;
else
break;
}
H[pt++] = p;
if (p == neg)
break;
}
}
used.clear();
for (int i = 0; i < pt; i++)
used.add(new Pair(X[H[i]], Y[H[i]]));
for (int i = 0; i < n; i++)
if (used.contains(new Pair(X[i], Y[i])))
writer.printf("%d ", i + 1);
writer.printf("\n");
}
long vec(int a, int b, int c) {
return 1l * X[c] * Y[a] * (X[b] - X[a]) * (Y[c] - Y[b]) - 1l * X[a] * Y[c] * (Y[b] - Y[a]) * (X[c] - X[b]);
}
static class InputReader {
tokenizer = null;
}
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
}
}
return tokenizer.nextToken();
}
public int nextInt() {
}
public double nextDouble() {
return Double.
parseDouble(next
()); }
public long nextLong() {
return Long.
parseLong(next
()); }
}
static class OutputWriter {
}
}
}
}
LyoqCiAqIENyZWF0ZWQgYnkgWmxvYm9iZXIgb24gMTQuMDQuMTUuCiAqLwppbXBvcnQgamF2YS5pby4qOwppbXBvcnQgamF2YS51dGlsLio7CgpwdWJsaWMgY2xhc3MgVGFza0MgewogICAgcHJpdmF0ZSBmaW5hbCBJbnB1dFJlYWRlciByZWFkZXI7CiAgICBwcml2YXRlIGZpbmFsIE91dHB1dFdyaXRlciB3cml0ZXI7CgogICAgcHVibGljIFRhc2tDKElucHV0UmVhZGVyIHJlYWRlciwgT3V0cHV0V3JpdGVyIHdyaXRlcikgewogICAgICAgIHRoaXMucmVhZGVyID0gcmVhZGVyOwogICAgICAgIHRoaXMud3JpdGVyID0gd3JpdGVyOwogICAgfQoKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKICAgICAgICBJbnB1dFJlYWRlciByZWFkZXIgPSBuZXcgSW5wdXRSZWFkZXIoU3lzdGVtLmluKTsKICAgICAgICBPdXRwdXRXcml0ZXIgd3JpdGVyID0gbmV3IE91dHB1dFdyaXRlcihTeXN0ZW0ub3V0KTsKICAgICAgICBuZXcgVGFza0MocmVhZGVyLCB3cml0ZXIpLnJ1bigpOwogICAgICAgIHdyaXRlci53cml0ZXIuZmx1c2goKTsKICAgIH0KCiAgICBpbnRbXSBYLCBZOwoKICAgIGNsYXNzIFBhaXIgaW1wbGVtZW50cyBDb21wYXJhYmxlPFBhaXI+IHsKICAgICAgICBpbnQgeCwgeTsKICAgICAgICBQYWlyKGludCB4LCBpbnQgeSkgewogICAgICAgICAgICB0aGlzLnggPSB4OwogICAgICAgICAgICB0aGlzLnkgPSB5OwogICAgICAgIH0KICAgICAgICBAT3ZlcnJpZGUKICAgICAgICBwdWJsaWMgaW50IGNvbXBhcmVUbyhQYWlyIG90aGVyKSB7CiAgICAgICAgICAgIGlmICh0aGlzLnggIT0gb3RoZXIueCkKICAgICAgICAgICAgICAgIHJldHVybiBJbnRlZ2VyLmNvbXBhcmUodGhpcy54LCBvdGhlci54KTsKICAgICAgICAgICAgcmV0dXJuIEludGVnZXIuY29tcGFyZSh0aGlzLnksIG90aGVyLnkpOwogICAgICAgIH0KICAgIH0KCiAgICBMaXN0W10gZXE7CiAgICBwdWJsaWMgdm9pZCBydW4oKSB7CiAgICAgICAgaW50IG4gPSByZWFkZXIubmV4dEludCgpOwogICAgICAgIFggPSBuZXcgaW50W25dOwogICAgICAgIFkgPSBuZXcgaW50W25dOwogICAgICAgIFRyZWVTZXQ8UGFpcj4gdXNlZCA9IG5ldyBUcmVlU2V0PFBhaXI+KCk7CiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspIHsKICAgICAgICAgICAgWFtpXSA9IHJlYWRlci5uZXh0SW50KCk7CiAgICAgICAgICAgIFlbaV0gPSByZWFkZXIubmV4dEludCgpOwogICAgICAgIH0KICAgICAgICBpbnQgYXB0ID0gMDsKICAgICAgICBJbnRlZ2VyW10gQSA9IG5ldyBJbnRlZ2VyW25dOwogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CiAgICAgICAgICAgIGlmICh1c2VkLmNvbnRhaW5zKG5ldyBQYWlyKFhbaV0sIFlbaV0pKSkKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIEFbYXB0KytdID0gaTsKICAgICAgICAgICAgICAgIHVzZWQuYWRkKG5ldyBQYWlyKFhbaV0sIFlbaV0pKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBBID0gQXJyYXlzLmNvcHlPZihBLCBhcHQpOwogICAgICAgIGludCBwb3MgPSAwOwogICAgICAgIGludCBuZWcgPSAwOwogICAgICAgIGZvciAoaW50IGkgPSAxOyBpIDwgQS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBpZiAoWVtBW2ldXSA+IFlbQVtwb3NdXSB8fCAoWVtBW2ldXSA9PSBZW0FbcG9zXV0gJiYgWFtBW2ldXSA+IFhbQVtwb3NdXSkpCiAgICAgICAgICAgICAgICBwb3MgPSBpOwogICAgICAgICAgICBpZiAoWFtBW2ldXSA+IFhbQVtuZWddXSB8fCAoWFtBW2ldXSA9PSBYW0FbbmVnXV0gJiYgWVtBW2ldXSA+IFlbQVtuZWddXSkpCiAgICAgICAgICAgICAgICBuZWcgPSBpOwogICAgICAgIH0KICAgICAgICBuZWcgPSBBW25lZ107CiAgICAgICAgaW50IHQgPSBBWzBdOwogICAgICAgIEFbMF0gPSBBW3Bvc107CiAgICAgICAgQVtwb3NdID0gdDsKICAgICAgICBwb3MgPSBBWzBdOwogICAgICAgIGZpbmFsIEludGVnZXJbXSBmaW5hbEEgPSBBOwogICAgICAgIEFycmF5cy5zb3J0KEEsIDEsIEEubGVuZ3RoLCBuZXcgQ29tcGFyYXRvcjxJbnRlZ2VyPigpIHsKICAgICAgICAgICAgQE92ZXJyaWRlCiAgICAgICAgICAgIHB1YmxpYyBpbnQgY29tcGFyZShJbnRlZ2VyIGEsIEludGVnZXIgYikgewogICAgICAgICAgICAgICAgbG9uZyB2ID0gdmVjKGZpbmFsQVswXSwgYSwgYik7CiAgICAgICAgICAgICAgICBpZiAodiAhPSAwKQogICAgICAgICAgICAgICAgICAgIHJldHVybiBMb25nLmNvbXBhcmUodiwgMCk7CiAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBpbnQgZGEgPSAoWFthXSAtIFhbZmluYWxBWzBdXSkgKiAoWFthXSAtIFhbZmluYWxBWzBdXSkgKyAoWVthXSAtIFlbZmluYWxBWzBdXSkgKiAoWVthXSAtIFlbZmluYWxBWzBdXSk7CiAgICAgICAgICAgICAgICAgICAgaW50IGRiID0gKFhbYl0gLSBYW2ZpbmFsQVswXV0pICogKFhbYl0gLSBYW2ZpbmFsQVswXV0pICsgKFlbYl0gLSBZW2ZpbmFsQVswXV0pICogKFlbYl0gLSBZW2ZpbmFsQVswXV0pOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBMb25nLmNvbXBhcmUoZGEsIGRiKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgICAgIGludFtdIEggPSBuZXcgaW50W0EubGVuZ3RoXTsKICAgICAgICBpbnQgcHQgPSAwOwogICAgICAgIEhbcHQrK10gPSBBWzBdOwogICAgICAgIGlmIChwb3MgIT0gbmVnKSB7CiAgICAgICAgICAgIGZvciAoaW50IGkgPSAxOyBpIDwgQS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgaW50IHAgPSBBW2ldOwogICAgICAgICAgICAgICAgd2hpbGUgKHRydWUpIHsKICAgICAgICAgICAgICAgICAgICBpZiAocHQgPCAyKQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICBpbnQgYSA9IEhbcHQgLSAyXTsKICAgICAgICAgICAgICAgICAgICBpbnQgYiA9IEhbcHQgLSAxXTsKICAgICAgICAgICAgICAgICAgICBsb25nIHYgPSB2ZWMoYSwgYiwgcCk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHYgPiAwKQogICAgICAgICAgICAgICAgICAgICAgICAtLXB0OwogICAgICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBIW3B0KytdID0gcDsKICAgICAgICAgICAgICAgIGlmIChwID09IG5lZykKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBBcnJheXMuc29ydChILCAwLCBwdCk7CiAgICAgICAgdXNlZC5jbGVhcigpOwogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgcHQ7IGkrKykKICAgICAgICAgICAgdXNlZC5hZGQobmV3IFBhaXIoWFtIW2ldXSwgWVtIW2ldXSkpOwogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQogICAgICAgICAgICBpZiAodXNlZC5jb250YWlucyhuZXcgUGFpcihYW2ldLCBZW2ldKSkpCiAgICAgICAgICAgICAgICB3cml0ZXIucHJpbnRmKCIlZCAiLCBpICsgMSk7CgogICAgICAgIHdyaXRlci5wcmludGYoIlxuIik7CiAgICB9CgogICAgbG9uZyB2ZWMoaW50IGEsIGludCBiLCBpbnQgYykgewogICAgICAgIHJldHVybiAxbCAqIFhbY10gKiBZW2FdICogKFhbYl0gLSBYW2FdKSAqIChZW2NdIC0gWVtiXSkgLSAxbCAqIFhbYV0gKiBZW2NdICogKFlbYl0gLSBZW2FdKSAqIChYW2NdIC0gWFtiXSk7CiAgICB9CgoKCiAgICBzdGF0aWMgY2xhc3MgSW5wdXRSZWFkZXIgewogICAgICAgIHB1YmxpYyBCdWZmZXJlZFJlYWRlciByZWFkZXI7CiAgICAgICAgcHVibGljIFN0cmluZ1Rva2VuaXplciB0b2tlbml6ZXI7CgogICAgICAgIHB1YmxpYyBJbnB1dFJlYWRlcihJbnB1dFN0cmVhbSBzdHJlYW0pIHsKICAgICAgICAgICAgcmVhZGVyID0gbmV3IEJ1ZmZlcmVkUmVhZGVyKG5ldyBJbnB1dFN0cmVhbVJlYWRlcihzdHJlYW0pLCAzMjc2OCk7CiAgICAgICAgICAgIHRva2VuaXplciA9IG51bGw7CiAgICAgICAgfQoKICAgICAgICBwdWJsaWMgU3RyaW5nIG5leHQoKSB7CiAgICAgICAgICAgIHdoaWxlICh0b2tlbml6ZXIgPT0gbnVsbCB8fCAhdG9rZW5pemVyLmhhc01vcmVUb2tlbnMoKSkgewogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICB0b2tlbml6ZXIgPSBuZXcgU3RyaW5nVG9rZW5pemVyKHJlYWRlci5yZWFkTGluZSgpKTsKICAgICAgICAgICAgICAgIH0gY2F0Y2ggKElPRXhjZXB0aW9uIGUpIHsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgUnVudGltZUV4Y2VwdGlvbihlKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gdG9rZW5pemVyLm5leHRUb2tlbigpOwogICAgICAgIH0KCiAgICAgICAgcHVibGljIGludCBuZXh0SW50KCkgewogICAgICAgICAgICByZXR1cm4gSW50ZWdlci5wYXJzZUludChuZXh0KCkpOwogICAgICAgIH0KCiAgICAgICAgcHVibGljIGRvdWJsZSBuZXh0RG91YmxlKCkgewogICAgICAgICAgICByZXR1cm4gRG91YmxlLnBhcnNlRG91YmxlKG5leHQoKSk7CiAgICAgICAgfQoKICAgICAgICBwdWJsaWMgbG9uZyBuZXh0TG9uZygpIHsKICAgICAgICAgICAgcmV0dXJuIExvbmcucGFyc2VMb25nKG5leHQoKSk7CiAgICAgICAgfQogICAgfQoKICAgIHN0YXRpYyBjbGFzcyBPdXRwdXRXcml0ZXIgewogICAgICAgIHB1YmxpYyBQcmludFdyaXRlciB3cml0ZXI7CgogICAgICAgIE91dHB1dFdyaXRlcihPdXRwdXRTdHJlYW0gc3RyZWFtKSB7CiAgICAgICAgICAgIHdyaXRlciA9IG5ldyBQcmludFdyaXRlcihzdHJlYW0pOwogICAgICAgIH0KCiAgICAgICAgcHVibGljIHZvaWQgcHJpbnRmKFN0cmluZyBmb3JtYXQsIE9iamVjdC4uLiBhcmdzKSB7CiAgICAgICAgICAgIHdyaXRlci5wcmludChTdHJpbmcuZm9ybWF0KExvY2FsZS5FTkdMSVNILCBmb3JtYXQsIGFyZ3MpKTsKICAgICAgICB9CiAgICB9Cn0K