106_B. Choosing Laptop
Vasya is choosing a laptop. The shop has n laptops to all tastes.

Vasya is interested in the following properties: processor speed, ram and hdd. Vasya is a programmer and not a gamer which is why he is not interested in all other properties.

If all three properties of a laptop are strictly less than those properties of some other laptop, then the first laptop is considered outdated by Vasya. Among all laptops Vasya does not consider outdated, he chooses the cheapest one.

There are very many laptops, which is why Vasya decided to write a program that chooses the suitable laptop. However, Vasya doesn't have his own laptop yet and he asks you to help him.

Input

The first line contains number n (1 ≤ n ≤ 100).

Then follow n lines. Each describes a laptop as speed ram hdd cost. Besides, 

  * speed, ram, hdd and cost are integers 
  * 1000 ≤ speed ≤ 4200 is the processor's speed in megahertz 
  * 256 ≤ ram ≤ 4096 the RAM volume in megabytes 
  * 1 ≤ hdd ≤ 500 is the HDD in gigabytes 
  * 100 ≤ cost ≤ 1000 is price in tugriks 



All laptops have different prices.

Output

Print a single number — the number of a laptop Vasya will choose. The laptops are numbered with positive integers from 1 to n in the order in which they are given in the input data.

Examples

Input

5
2100 512 150 200
2000 2048 240 350
2300 1024 200 320
2500 2048 80 300
2000 512 180 150


Output

4

Note

In the third sample Vasya considers the first and fifth laptops outdated as all of their properties cannot match those of the third laptop. The fourth one is the cheapest among the laptops that are left. Thus, Vasya chooses the fourth laptop.
```python
from sys import stdin,stdout
from heapq import heapify,heappush,heappop,heappushpop
from collections import defaultdict as dd, deque as dq,Counter as C
from bisect import bisect_left as bl ,bisect_right as br
from itertools import combinations as cmb,permutations as pmb
from math import factorial as f ,ceil,gcd,sqrt,log,inf
mi = lambda : map(int,input().split())
ii = lambda: int(input())
li = lambda : list(map(int,input().split()))
mati = lambda  r : [ li() for _ in range(r)]
lcm = lambda a,b : (a*b)//gcd(a,b) 
MOD=10**9+7
def soe(n):
    prime = [True for i in range(n+1)]
    p = 2
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return(prime)
def ncr(n,r):
    p,k=1,1
    if (n - r < r):
        r = n - r
    if r!=0:
        while(r):
            p,k=p*n,k*r
            m=gcd(p,k)
            p,k=p//m,k//m
            n,r=n-1,r-1
    else:
            p=1
    return(p)




def solve():
    n=ii()
    arr=[]
    for x in range(n):
        arr.append(li())
    a=[]
    for x in range(n):
        p=arr[x]
        valid=True
        for y in range(n):
            if x!=y:
                q=arr[y]
                if p[0]<q[0] and p[1]<q[1] and p[2]<q[2]:
                    valid=False
        if valid:
            a.append(p)
    a.sort(key= lambda x:x[3])
    # for x in a:
    #     print(x)
    print(arr.index(a[0])+1)
for _ in range(1):
    solve()
```