• + 0 comments

    Java :

    import java.util.Scanner;
    
    public class Solution {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int n = sc.nextInt();
            int a = Integer.MAX_VALUE, b = Integer.MAX_VALUE;
            while (n-- > 0) {
                a = Math.min(a, sc.nextInt());
                b = Math.min(b, sc.nextInt());
            }
            
            System.out.println(1L * a * b);
        }
    }