An integer sequence is called beautiful if the difference between any two consecutive numbers is equal to $1$. More formally, a sequence $s_1, s_2, \ldots, s_{n}$ is beautiful if $|s_i - s_{i+1}| = 1$ for all $1 \leq i \leq n - 1$.

Trans has $a$ numbers $0$, $b$ numbers $1$, $c$ numbers $2$ and $d$ numbers $3$. He wants to construct a beautiful sequence using all of these $a + b + c + d$ numbers.

However, it turns out to be a non-trivial task, and Trans was not able to do it. Could you please help Trans?


-----Input-----

The only input line contains four non-negative integers $a$, $b$, $c$ and $d$ ($0 < a+b+c+d \leq 10^5$).


-----Output-----

If it is impossible to construct a beautiful sequence satisfying the above constraints, print "NO" (without quotes) in one line.

Otherwise, print "YES" (without quotes) in the first line. Then in the second line print $a + b + c + d$ integers, separated by spaces — a beautiful sequence. There should be $a$ numbers equal to $0$, $b$ numbers equal to $1$, $c$ numbers equal to $2$ and $d$ numbers equal to $3$.

If there are multiple answers, you can print any of them.


-----Examples-----
Input
2 2 2 1

Output
YES
0 1 0 1 2 3 2

Input
1 2 3 4

Output
NO

Input
2 2 2 3

Output
NO



-----Note-----

In the first test, it is easy to see, that the sequence is beautiful because the difference between any two consecutive numbers is equal to $1$. Also, there are exactly two numbers, equal to $0$, $1$, $2$ and exactly one number, equal to $3$.

It can be proved, that it is impossible to construct beautiful sequences in the second and third tests.

Difficulty: competition

Starter code:

Solutions:
def solve(a, e):
	if not a[e]:
		return False, []
	a = list(a[::])
	ans = [e]
	a[e] -= 1
	for i in range(sum(a)):
		if ans[-1] - 1 >= 0 and a[ans[-1] - 1] > 0:
			v = ans[-1] - 1
			ans.append(v)
			a[v] -= 1
		elif ans[-1] + 1 <= 3 and a[ans[-1] + 1] > 0:
			v = ans[-1] + 1
			ans.append(v)
			a[v] -= 1
		else:
			return False, []
	return True, ans

def main():
	a = list(map(int, input().split()))
	for i in range(4):
		r, b = solve(a, i)
		if r:
			print('YES')
			print(*b)
			return
	print('NO')

main()


a, b, c, d = list(map(int, input().split()))
try:
    assert abs(a - b + c - d) < 2
    ans = []
    if not d:
        ans = [1, 0] * a + [1, 2] * c
        if a + c < b:
            ans.append(1)
        if a + c > b:
            ans.pop(0)
    elif not a:
        ans = [2, 3] * d + [2, 1] * b
        if d + b < c:
            ans.append(2)
        if d + b > c:
            ans.pop(0)
    elif a + c > b + d:
        while a:
            ans.append(0)
            ans.append(1)
            a -= 1
            b -= 1
        assert b >= 0
        while b:
            ans.append(2)
            ans.append(1)
            b -= 1
            c -= 1
        assert c >= 0
        while c:
            ans.append(2)
            ans.append(3)
            c -= 1
            d -= 1
        ans.pop()
    else:
        while d:
            ans.append(3)
            ans.append(2)
            c -= 1
            d -= 1
        assert c >= 0
        while c:
            ans.append(1)
            ans.append(2)
            b -= 1
            c -= 1
        assert b >= 0
        while b:
            ans.append(1)
            ans.append(0)
            a -= 1
            b -= 1
        if a:
            ans.pop()
    print("YES")
    print(*ans)
except AssertionError:
    print("NO")


3

import os
import sys


def main():
    A, B, C, D = read_ints()
    ans = solve(A, B, C, D)
    if ans:
        print('YES')
        print(*ans)
    else:
        print('NO')


def solve(A, B, C, D):
    S = A + B + C + D
    for l in range(4):
        for r in range(4):
            ans = build([A, B, C, D], S, l, r)
            if ans:
                return ans

    return None


def build(A, S, l, r):
    #dprint('l', l, 'r', r)
    if A[l] == 0:
        return None
    ans = [l]
    A[l] -= 1
    i = l
    S -= 1
    while S > 0:
        #dprint(ans)
        if i == 0:
            j = 1
        elif i == 1:
            if A[0] == 0:
                j = 2
            elif A[2] == 0:
                j = 0
            elif r <= 1:
                j = 2
            else:
                j = 0
        elif i == 2:
            if A[3] == 0:
                j = 1
            elif A[1] == 0:
                j = 3
            elif r >= 2:
                j = 1
            else:
                j = 3
        else:
            j = 2

        A[j] -= 1
        S -= 1
        ans.append(j)
        if A[j] < 0:
            return None
        i = j

    return ans


###############################################################################

DEBUG = 'DEBUG' in os.environ


def inp():
    return sys.stdin.readline().rstrip()


def read_int():
    return int(inp())


def read_ints():
    return [int(e) for e in inp().split()]


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


def __starting_point():
    main()

__starting_point()

import sys
input = sys.stdin.readline

a,b,c,d=list(map(int,input().split()))

for start in range(4):
    ANS=[]
    now=start
    A=[a,b,c,d]

    if A[now]==0:
        continue

    while True:
        A[now]-=1
        ANS.append(now)

        if now==0:
            if A[1]!=0:
                now=1
            else:
                break

        elif now==1:
            if A[0]!=0:
                now=0
            elif A[2]!=0:
                now=2
            else:
                break

        elif now==2:
            if A[3]!=0:
                now=3
            elif A[1]!=0:
                now=1
            else:
                break
        else:
            if A[2]!=0:
                now=2
            else:
                break

    if max(A)==0:
        print("YES")
        print(*ANS)
        return
print("NO")
        


a = list(map(int, input().split()))
s = a[0] + a[1] + a[2] + a[3]
out = []
if s == 1:
    for i in range(4):
        if a[i] > 0:
            print('YES')
            print(i)
            return

for i in range(3):
    fst, snd = i, i+1
    if a[fst] == a[snd]:
        check = True
        for j in range(4):
            if j != fst and j != snd:
                if a[j] != 0:
                    check = False
        if check:
            out = [i, i+1] * a[fst]
            print('YES')
            print(' '.join(list(map(str, out))))
            return
    if a[fst] == a[snd] + 1:
        check = True
        for j in range(4):
            if j != fst and j != snd:
                if a[j] != 0:
                    check = False
        if check:
            out = [i, i+1] * a[snd] + [i]
            print('YES')
            print(' '.join(list(map(str, out))))
            return
    if a[fst] + 1 == a[snd]:
        check = True
        for j in range(4):
            if j != fst and j != snd:
                if a[j] != 0:
                    check = False
        if check:
            out = [i+1] + [i, i+1] * a[fst]
            print('YES')
            print(' '.join(list(map(str, out))))
            return
if a[1] < a[0]:
    print('NO')
    return
if a[2] < a[3]:
    print('NO')
    return

left = [0,1] * a[0]
right = [2,3] * a[3]

a[1] -= a[0]
a[2] -= a[3]

if a[1] == a[2] + 1:
    out = [1] + left + [2,1] * a[2] + right
    print('YES')
    print(' '.join(list(map(str, out))))
    return
if a[1] == a[2]:
    out = left + [2,1] * a[1] + right
    print('YES')
    print(' '.join(list(map(str, out))))
    return
if a[1] + 1 == a[2]:
    out = left + [2,1] * a[1] + right + [2]
    print('YES')
    print(' '.join(list(map(str, out))))
    return
print('NO')
return


import sys
readline = sys.stdin.readline
 
def check(A, B, C, D):
    N = A+B+C+D
    if not (A+C == N//2 or A+C == -(-N//2)):
        return False
    even = [2]*C + [0]*A
    odd = [3]*D + [1]*B
    ans = [None]*N
    flag = (B+D == -(-N//2))
    for i in range(N):
        if (i%2 == 0) == flag:
            ans[i] = odd[i//2]
        else:
            ans[i] = even[i//2]
    if all(abs(a2-a1) == 1 for a1, a2 in zip(ans, ans[1:])):
        return ans
    return False
    
A, B, C, D = map(int, readline().split())
ans = check(A, B, C, D)
if ans == False:
    print('NO')
else:
    print('YES')
    print(*ans)