output_description: If the state where p_i=i for every i can be reached by performing the
  operation, print `Yes`; otherwise, print `No`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      p_1
      :
      p_N
attempt: N = int(input())
  ret = "Yes"
  isOdd = 1
  for __ in range(N):
    if int(input())%2 != isOdd
    	ret = "No"
    isOdd = 1 - isOdd
  print(ret)
problem_description: Statement
  
  You are given a permutation of 1,2,...,N: p_1,p_2,...,p_N. Determine if the
  state where p_i=i for every i can be reached by performing the following
  operation any number of times:
  
    * Choose three elements p_{i-1},p_{i},p_{i+1} (2\leq i\leq N-1) such that p_{i-1}>p_{i}>p_{i+1} and reverse the order of these three.
samples: [{"input": "5\n    5\n    2\n    1\n    4\n    3", "output": "Yes\n    \n\nThe state where p_i=i for every i can be reached as follows:\n\n  * Reverse the order of p_1,p_2,p_3. The sequence p becomes 1,2,5,4,3.\n  * Reverse the order of p_3,p_4,p_5. The sequence p becomes 1,2,3,4,5.\n\n* * *"}, {"input": "4\n    3\n    2\n    4\n    1", "output": "No\n    \n\n* * *"}, {"input": "7\n    3\n    2\n    1\n    6\n    5\n    4\n    7", "output": "Yes\n    \n\n* * *"}, {"input": "6\n    5\n    3\n    4\n    1\n    2\n    6", "output": "No"}]