There is a right triangle with legs of length *a* and *b*. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to the coordinate axes. All the vertices must have integer coordinates. If there exists such a location, you have to output the appropriate coordinates of vertices.
The first line contains two integers *a*, *b* (1 ≤ *a*, *b* ≤ 1000), separated by a single space.
x,y = map(int,input().split())
if x>=y:
   a=x
   b=y
else:
   a=y
   b=x
lmb = a/b
f=1
for i in range(1,b):
   p = lmb*pow((b**2-i**2),1/2)
   q = lmb*i
   if p-int(p)<=0.01 and q-int(q)<=0.01:
      print("YES")
      print("0 0")
      print(str(int(p))+" "+str(int(q)))
      print(str(i)+" "+str(int(p/lmb)))
      f=0
      break
if f:
   print("NO")
   