output_description: Print the number of pairs (i,\ j) (1 ≤ i < j ≤ N) such that the condition is
  held.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      x_1 y_1
      x_2 y_2
      :
      x_M y_M
attempt: import sys
  
  from itertools import combinations
  
  n, m = map(int, input().split())
  survivors = {v: {v + 1} for v in range(n)}
  for x, y in reversed(map(int, line.split()) for line in sys.stdin.readlines()):
      for v, srv in survivors.copy().items():
          if x in srv:
              if y in srv:
                  del survivors[v]
              else:
                  srv.add(y)
          elif y in srv:
              srv.add(x)
  print(sum(su.isdisjoint(sv) for su, sv in combinations(survivors.values(), 2)))
  
problem_description: Statement
  
  There are N turkeys. We number them from 1 through N.
  
  M men will visit here one by one. The i-th man to visit will take the
  following action:
  
    * If both turkeys x_i and y_i are alive: selects one of them with equal probability, then eats it.
    * If either turkey x_i or y_i is alive (but not both): eats the alive one.
    * If neither turkey x_i nor y_i is alive: does nothing.
  
  Find the number of pairs (i,\ j) (1 ≤ i < j ≤ N) such that the following
  condition is held:
  
    * The probability of both turkeys i and j being alive after all the men took actions, is greater than 0.
samples: [{"input": "3 1\n    1 2", "output": "2\n    \n\n(i,\\ j) = (1,\\ 3), (2,\\ 3) satisfy the condition.\n\n* * *"}, {"input": "4 3\n    1 2\n    3 4\n    2 3", "output": "1\n    \n\n(i,\\ j) = (1,\\ 4) satisfies the condition. Both turkeys 1 and 4 are alive if:\n\n  * The first man eats turkey 2.\n  * The second man eats turkey 3.\n  * The third man does nothing.\n\n* * *"}, {"input": "3 2\n    1 2\n    1 2", "output": "0\n    \n\n* * *"}, {"input": "10 10\n    8 9\n    2 8\n    4 6\n    4 9\n    7 8\n    2 8\n    1 8\n    3 4\n    3 4\n    2 7", "output": "5"}]