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.
n,m = map(int,input().split())
if n>m:
    n,m = m,n
u1,v1 = float("inf")
for i in range(1,n):
    if 2*i**2>n:
        break 
    x = n**2-i**2
    x = pow(x,1/2)
    if x%10==0:
        u1,v1 = i,int(pow(x,1/2))
        break 
if u1==float("inf"):
    print("NO")
else:
    u2,v2 = n-u1,-(m-v1)
    if u2**2+v2**2==m:
        print("YES")
        print(0,0)
        print(u1,v1)
        print(u2,v2)
    else:
        print("NO")