Processing math: 100%
Maximum product - MarisaOJ: Marisa Online Judge

Maximum product

Time limit: 1000 ms
Memory limit: 256 MB
You are given an array A of length n. Find the maximum value of ai×aj and i<j. ### Input - The first line contains an integer n. - The second line contains n integers Ai. ### Output - Print a single integer which is maximum value possible. ### Constraints - 2≤n≤103. - |Ai|≤1000. ### Example Input: 4-2-1034 Output: 20