output_description: Print the number of ways for the knight to reach (X, Y) from (0, 0), modulo
  10^9 + 7.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      X Y
attempt: # Python3 code to find minimum steps to reach
  # to specific cell in minimum moves by Knight
  class cell:
  
      def __init__(self, x=0, y=0, dist=0):
          self.x = x
          self.y = y
          self.dist = dist
  
      # checks whether given position is
  
  
  # inside the board
  def isInside(x, y, N):
      if x >= 1 and x <= N and y >= 1 and y <= N:
          return True
      return False
  
  
  # Method returns minimum step to reach
  # target position
  def minStepToReachTarget(knightpos, targetpos, N):
      # all possible movments for the knight
      dx = [2, 2, 1, 1]
      dy = [1, 1, 2, 2]
  
      queue = []
  
      # push starting position of knight
      # with 0 distance
      queue.append(cell(knightpos[0], knightpos[1], 0))
  
      # make all cell unvisited
      visited = [[False for i in range(N + 1)] for j in range(N + 1)]
  
      # visit starting state
      visited[knightpos[0]][knightpos[1]] = True
  
      # loop untill we have one element in queue
      while len(queue) > 0:
  
          t = queue[0]
          queue.pop(0)
  
          # if current cell is equal to target
          # cell, return its distance
          if t.x == targetpos[0] and t.y == targetpos[1]:
              return t.dist
  
          # iterate for all reachable states
          for i in range(4):
  
              x = t.x + dx[i]
              y = t.y + dy[i]
  
              if isInside(x, y, N) and not visited[x][y]:
                  visited[x][y] = True
                  queue.append(cell(x, y, t.dist + 1))
  
              # Driver Code
  
  
  if __name__ == "__main__":
      N = 1000
      targetpos = list(map(int, input().split()))
      knightpos = [0, 0]
      (
          print(int(minStepToReachTarget(knightpos, targetpos, N) % 1e7))
          if minStepToReachTarget(knightpos, targetpos, N) is not None
          else print(0)
      )
  
  # This code is contributed by
  # Kaustav kumar Chanda
  
problem_description: Statement
  
  There is a knight - the chess piece - at the origin (0, 0) of a two-
  dimensional grid.
  
  When the knight is at the square (i, j), it can be moved to either (i+1,j+2)
  or (i+2, j+1).
  
  In how many ways can the knight reach the square (X, Y)?
  
  Find the number of ways modulo 10^9 + 7.
samples: [{"input": "3 3", "output": "2\n    \n\nThere are two ways: (0,0) \\to (1,2) \\to (3,3) and (0,0) \\to (2,1) \\to (3,3).\n\n* * *"}, {"input": "2 2", "output": "0\n    \n\nThe knight cannot reach (2,2).\n\n* * *"}, {"input": "999999 999999", "output": "151840682\n    \n\nPrint the number of ways modulo 10^9 + 7."}]