output_description: Print the maximum possible area of the rectangle. If no rectangle can be
  formed, print 0.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      A_1 A_2 ... A_N
attempt: import sys
  
  stdin = sys.stdin
  
  
  def li():
      return map(int, stdin.readline().split())
  
  
  def li_():
      return map(lambda x: int(x) - 1, stdin.readline().split())
  
  
  def lf():
      return map(float, stdin.readline().split())
  
  
  def ls():
      return stdin.readline().split()
  
  
  def ns():
      return stdin.readline().rstrip()
  
  
  def lc():
      return list(ns())
  
  
  def ni():
      return int(stdin.readline())
  
  
  def nf():
      return float(stdin.readline())
  
  
  from collections import Counter
  
  n = ni()
  a = list(li())
  
  cnt = Counter(a)
  
  lst = []
  for k, v in cnt.items():
      lst.append((k, v))
  
  lst.sort(reverse=True)
  
  first = 0
  second = 0
  
  for k, v in lst:
      if v >= 4 and first == 0:
          first = k
          second = k
          break
  
      elif v >= 4:
          second = k
          break
  
      elif v >= 2 and first != 0:
          second = k
          break
  
      elif v >= 2:
          first = k
  
  print(first * second)
  
problem_description: Statement
  
  We have N sticks with negligible thickness. The length of the i-th stick is
  A_i.
  
  Snuke wants to select four different sticks from these sticks and form a
  rectangle (including a square), using the sticks as its sides. Find the
  maximum possible area of the rectangle.
samples: [{"input": "6\n    3 1 2 4 2 1", "output": "2\n    \n\n1 \\times 2 rectangle can be formed.\n\n* * *"}, {"input": "4\n    1 2 3 4", "output": "0\n    \n\nNo rectangle can be formed.\n\n* * *"}, {"input": "10\n    3 3 3 3 4 4 4 5 5 5", "output": "20"}]