Manao has invented a new mathematical term — a beautiful set of points. He calls a set of points on a plane beautiful if it meets the following conditions:
 1.  The coordinates of each point in the set are integers. 1.  For any two points from the set, the distance between them is a non-integer. 
Consider all points (*x*, *y*) which satisfy the inequations: 0 ≤ *x* ≤ *n*; 0 ≤ *y* ≤ *m*; *x* + *y* &gt; 0. Choose their subset of maximum size such that it is also a beautiful set of points.
The single line contains two space-separated integers *n* and *m* (1 ≤ *n*, *m* ≤ 100).
import math


def solve():
  n, m = input().split()
  n = int(n)
  m = int(m)

  for x in range(n + 1):
    points = []

    for y in range(m + 1):
      if x + y <= 0:
        continue

      if not points:
        points.append((x, y))
        continue

      is_beautiful = True

      for x2, y2 in points:
        if isinstance(distance(x2, y2, x, y), int):
          is_beautiful = False
          break

      if is_beautiful:
        points.append((x, y))

    if len(points) > 1:
      print(len(points))
      for x, y in points:
        print(x, y)
      return


def distance(x2, y2, x1, y1):
  return math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)


solve()
