output_description: Print the number of the possible orders in which they were standing, modulo
  10^9+7.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
      A_1 A_2 ... A_N
attempt: N = int(input())
  A = list(map(int,input().split()))
  
  d = {}
  for i in set(A):
      d[i] = 0
  
  if N % 2 == 1:
      for i in A:
          d[i] += 1
      for k,v in d.items():
          if k == 0:
              if v != 1:
                  print(0)
                  exit()
              continue
          if v != 2:
              print(0)
              exit()
  
  else:
      for i in A:
          d[i] += 1
      for k,v in d.items():
          if k == 0:
              if v != 0:
                  print(0)
                  exit()
          if v != 2:
              print(0)
              exit()
  
  
  ans = 2
  M = 10**9 + 7
  if N % 2 == 1:
      ans = 2**((N-1)/2) % M
  else:
      ans = 2**(N/2) % M
  print(int(ans))
  ~
  ~
  
problem_description: Statement
  
  There are N people, conveniently numbered 1 through N. They were standing in a
  row yesterday, but now they are unsure of the order in which they were
  standing. However, each person remembered the following fact: the absolute
  difference of the number of the people who were standing to the left of that
  person, and the number of the people who were standing to the right of that
  person. According to their reports, the difference above for person i is A_i.
  
  Based on these reports, find the number of the possible orders in which they
  were standing. Since it can be extremely large, print the answer modulo
  10^9+7. Note that the reports may be incorrect and thus there may be no
  consistent order. In such a case, print 0.
samples: [{"input": "5\n    2 4 4 0 2", "output": "4\n    \n\nThere are four possible orders, as follows:\n\n  * 2,1,4,5,3\n  * 2,5,4,1,3\n  * 3,1,4,5,2\n  * 3,5,4,1,2\n\n* * *"}, {"input": "7\n    6 4 0 2 4 0 2", "output": "0\n    \n\nAny order would be inconsistent with the reports, thus the answer is 0.\n\n* * *"}, {"input": "8\n    7 5 1 1 7 3 5 3", "output": "16"}]