#!/bin/python3

import os
import sys

# Complete the solve function below.
def solve(steps):
    a = min(map(lambda x : x[0],steps))
    b = min(map(lambda x : x[1],steps))
    return a*b

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    n = int(input())

    steps = []

    for _ in range(n):
        steps.append(list(map(int, input().rstrip().split())))

    result = solve(steps)

    fptr.write(str(result) + '\n')

    fptr.close()

668f63bd443cbd19ba800415c6a1aaa0c14a1c9c
<mask token>

<mask token>


def solve(steps):
    a = min(map(lambda x: x[0], steps))
    b = min(map(lambda x: x[1], steps))
    return a * b


<mask token>

<mask token>


def solve(steps):
    a = min(map(lambda x: x[0], steps))
    b = min(map(lambda x: x[1], steps))
    return a * b


if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')
    n = int(input())
    steps = []
    for _ in range(n):
        steps.append(list(map(int, input().rstrip().split())))
    result = solve(steps)
    fptr.write(str(result) + '\n')
    fptr.close()

import os
import sys


def solve(steps):
    a = min(map(lambda x: x[0], steps))
    b = min(map(lambda x: x[1], steps))
    return a * b


if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')
    n = int(input())
    steps = []
    for _ in range(n):
        steps.append(list(map(int, input().rstrip().split())))
    result = solve(steps)
    fptr.write(str(result) + '\n')
    fptr.close()

#!/bin/python3

import os
import sys

# Complete the solve function below.
def solve(steps):
    a = min(map(lambda x : x[0],steps))
    b = min(map(lambda x : x[1],steps))
    return a*b

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    n = int(input())

    steps = []

    for _ in range(n):
        steps.append(list(map(int, input().rstrip().split())))

    result = solve(steps)

    fptr.write(str(result) + '\n')

    fptr.close()
