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, …, s_{n} is beautiful if |s_i - s_{i+1}| = 1 for all 1 ≤ i ≤ 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 ≤ 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: HARD
Tags: Greedy algorithms

Complete search

Constructive algorithms
Skill types: Complete search

Greedy algorithms

Starter code:

Solutions:
_count = list(map(int, input().split()))
num = '0 1 2 3'.split()
for pos in range(4):
	count = _count[:]
	ans = []
	for i in range(sum(count)):
		ans.append(num[pos])
		count[pos] -= 1
		if pos == 1:
			if count[0] > 0:
				pos = 0
			else:
				pos = 2
		elif pos == 2:
			if count[3] > 0:
				pos = 3
			else:
				pos = 1
		elif pos == 0:
			pos = 1
		elif pos == 3:
			pos = 2
	if max(count) == min(count) == 0:
		print('YES')
		print(*ans)
		exit()
else:
	print('NO')


from copy import deepcopy
arr = list(map(int, input().split()))
s = sum(arr)
for i in range(4):
	brr = deepcopy(arr)
	if not arr[i]:
		continue
	ans = []
	ans.append(i)
	brr[i] -= 1
	cur = i
	for i in range(s - 1):
		if cur <= 2 and brr[cur + 1]:
			cur += 1
			brr[cur] -= 1
			ans.append(cur)
		elif cur >= 1 and brr[cur - 1]:
			cur -= 1
			brr[cur] -= 1
			ans.append(cur)
		else:
			break
	if len(ans) == s:
		print('YES')
		print(*ans)
		exit()
print('NO')


(a, b, c, d) = [int(x) for x in input().split(' ')]
if abs(a + c - b - d) > 1:
	print('NO')
elif d > c:
	if d - c > 1:
		print('NO')
	elif a != 0 or b != 0:
		print('NO')
	else:
		print('YES')
		for i in range(c):
			print(3, 2, sep=' ', end=' ')
		print(3)
elif a > b:
	if a - b > 1:
		print('NO')
	elif c != 0 or d != 0:
		print('NO')
	else:
		print('YES')
		for i in range(b):
			print(0, 1, sep=' ', end=' ')
		print(0)
else:
	print('YES')
	if a + c >= b + d:
		for i in range(a):
			print(0, 1, sep=' ', end=' ')
		for i in range(b - a):
			print(2, 1, sep=' ', end=' ')
		for i in range(d):
			print(2, 3, sep=' ', end=' ')
		for i in range(a + c - b - d):
			print(2)
	else:
		print(1, end=' ')
		for i in range(a):
			print(0, 1, sep=' ', end=' ')
		for i in range(b - a - 1):
			print(2, 1, sep=' ', end=' ')
		for i in range(d):
			print(2, 3, sep=' ', end=' ')


def find_ans(a, b, c, d):
	if a == 0 and b == 0:
		if d == c + 1:
			str_ = '2 3 ' * c
			str_ = '3 ' + str_
			print('YES')
			print(str_)
			return
	elif d == 0 and c == 0:
		if a - 1 == b:
			str_ = '0 1 ' * b
			str_ = str_ + '0'
			print('YES')
			print(str_)
			return
	if a > b or d > c:
		print('NO')
		return
	str_left = '0 1 ' * a
	b = b - a
	str_right = '2 3 ' * d
	c = c - d
	str_val = '2 1 ' * min(b, c)
	(b, c) = (b - min(b, c), c - min(b, c))
	if b > 1 or c > 1:
		print('NO')
		return
	if b == 1:
		str_left = '1 ' + str_left
	if c == 1:
		str_right += '2 '
	result = str_left + str_val + str_right
	print('YES')
	print(result)

def main():
	values = input()
	values = values.split(' ')
	find_ans(int(values[0]), int(values[1]), int(values[2]), int(values[3]))
main()


(a, b, c, d) = map(int, input().split())
length = min(a, b)
(a, b) = (a - length, b - length)
answer = [0, 1] * length
length = min(c, d)
(c, d) = (c - length, d - length)
answer.extend([2, 3] * length)
length = min(b, c)
(b, c) = (b - length, c - length)
answer.extend([2, 1] * length)
if a > 0:
	answer.append(0)
	a -= 1
if b > 0:
	answer.insert(0, 1)
	b -= 1
if c > 0:
	answer.append(2)
	c -= 1
if d > 0:
	answer.insert(0, 3)
	d -= 1
is_right = True
for i in range(0, len(answer) - 1):
	if abs(answer[i] - answer[i + 1]) != 1:
		is_right = False
		break
if not is_right or a + b + c + d:
	print('NO')
else:
	print('YES')
	print(*answer)


(a, b, c, d) = map(int, input().split())
if a > b + 1 or b > a + c + 1 or c > b + d + 1 or (d > c + 1):
	print('NO')
else:
	d1 = d
	d2 = d
	L1 = ['k']
	L2 = ['k']
	for i in range(a):
		L1.append(0)
		L1.append('k')
		L2.append(0)
		L2.append('k')
	for i in range(c):
		L1.append(2)
		L1.append('k')
		L2.append(2)
		L2.append('k')
	ptr1 = 0
	for i in range(b):
		if ptr1 >= len(L1):
			break
		L1[ptr1] = 1
		ptr1 += 2
	for i in range(ptr1, len(L1), 2):
		L1[i] = 3
		d1 -= 1
	ptr2 = 2
	for i in range(b):
		if ptr2 >= len(L2):
			break
		L2[ptr2] = 1
		ptr2 += 2
	for i in range(ptr2, len(L2), 2):
		L2[i] = 3
		d2 -= 1
	if len(L1) > 0 and L1[-1] == 'k' or d1 == -1:
		L1 = L1[:len(L1) - 1]
	if len(L1) > 0 and L1[0] == 'k':
		L1 = L1[1:]
	if len(L2) > 0 and L2[-1] == 'k' or d2 == -1:
		L2 = L2[:len(L2) - 1]
	if len(L2) > 0 and L2[0] == 'k':
		L2 = L2[1:]
	flag = 0
	if L1.count(0) != a or L1.count(1) != b or L1.count(2) != c or (L1.count(3) != d) or (L1.count('k') > 0):
		flag = 1
	if flag == 0:
		for i in range(0, len(L1) - 1):
			if abs(L1[i] - L1[i + 1]) != 1:
				flag = 1
				break
	if flag == 0:
		print('YES')
		print(*L1)
	else:
		if L2.count(0) != a or L2.count(1) != b or L2.count(2) != c or (L2.count(3) != d) or (L2.count('k') > 0):
			flag = 2
		if flag == 1:
			for i in range(0, len(L2) - 1):
				if abs(L2[i] - L2[i + 1]) != 1:
					flag = 2
					break
		if flag == 1:
			print('YES')
			print(*L2)
	if flag == 2:
		print('NO')


(a, b, c, d) = [int(x) for x in input().split()]
res = [0 for _ in range(a)]
res += [2 for _ in range(c)]
if a + c < b + d:
	ind = 0
else:
	ind = 1
while b > 0:
	res.insert(ind, 1)
	ind += 2
	b -= 1
while d > 0:
	res.insert(ind, 3)
	ind += 2
	d -= 1
tr = True
for i in range(1, len(res)):
	if abs(res[i - 1] - res[i]) != 1:
		print('NO')
		tr = False
		break
if tr:
	print('YES')
	print(*res)


from sys import stdin

def rl():
	return [int(w) for w in stdin.readline().split()]
(a, b, c, d) = rl()

class Fail(Exception):
	pass

def go(x):
	s = [a, b, c, d]
	r = []
	while sum(s) > 0:
		r.append(x)
		s[x] -= 1
		if s[x] < 0:
			return
		if x == 0:
			x = 1
		elif x == 1:
			if s[0] < s[1] or s[0] == 0:
				x = 2
			else:
				x = 0
		elif x == 2:
			if s[3] < s[2] or s[3] == 0:
				x = 1
			else:
				x = 3
		elif x == 3:
			x = 2
	return r
for start in range(4):
	r = go(start)
	if r:
		print('YES')
		print(*r)
		break
else:
	print('NO')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for pp in range(t):
		solve(pp)

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def google(p):
	print('Case #' + str(p) + ': ', end='')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve(case):
	(a, b, c, d) = sep()
	left = []
	right = []
	mid = []
	for i in range(min(a, b)):
		left.append(0)
		left.append(1)
		a -= 1
		b -= 1
	for i in range(min(c, d)):
		right.append(2)
		right.append(3)
		c -= 1
		d -= 1
	for i in range(min(c, b)):
		mid.append(2)
		mid.append(1)
		c -= 1
		b -= 1
	if b > 0:
		left.insert(0, 1)
		b -= 1
	if c > 0:
		right.append(2)
		c -= 1
	if a > 0:
		left.append(0)
		a -= 1
	if d > 0:
		right.insert(0, 3)
		d -= 1
	if a > 0 or b > 0 or c > 0 or (d > 0):
		print('NO')
	else:
		f = True
		ans = left + mid + right
		for i in range(1, len(ans)):
			if abs(ans[i] - ans[i - 1]) == 1:
				continue
			else:
				f = False
				break
		if f:
			print('YES')
			print(' '.join((str(ans[i]) for i in range(len(ans)))))
		else:
			print('NO')
testcase(1)


(a, b, c, d) = map(int, input().split())
n = a + b + c + d
if n == 1 and a == 1:
	print('YES')
	print(0)
elif n == 2 and b == 2:
	print('NO')
elif a == 0 and b == 0:
	if c == 0:
		if d == 1:
			print('YES')
			print(3)
		else:
			print('NO')
	elif d == c - 1 or d == c or d == c + 1:
		print('YES')
		if d == c + 1:
			print(3, end=' ')
			n = n - 1
		for i in range(n):
			if i % 2 == 0:
				print(2, end=' ')
			else:
				print(3, end=' ')
	else:
		print('NO')
elif d > c:
	print('NO')
elif d == 0 and c == 0:
	if b < a - 1 or b > a + 1:
		print('NO')
	else:
		print('YES')
		if b == a + 1:
			print(1, end=' ')
			n = n - 1
		for i in range(n):
			if i % 2 == 0:
				print(0, end=' ')
			else:
				print(1, end=' ')
else:
	nee = a + max(0, c - d - 1)
	if b < nee or b > nee + 2:
		print('NO')
	elif b < a:
		print('NO')
	else:
		print('YES')
		if nee + 2 == b or b == nee + 1:
			print(1, end=' ')
			b = b - 1
			for i in range(n - 1):
				if i % 2 == 0 and a != 0:
					print(0, end=' ')
					a -= 1
				elif i % 2 == 0 and c != 0:
					print(2, end=' ')
					c -= 1
				elif b != 0:
					print(1, end=' ')
					b -= 1
				else:
					print(3, end=' ')
		else:
			for i in range(n):
				if i % 2 == 0 and a != 0:
					print(0, end=' ')
					a -= 1
				elif i % 2 == 0 and c != 0:
					print(2, end=' ')
					c -= 1
				elif b != 0:
					print(1, end=' ')
					b -= 1
				else:
					print(3, end=' ')


numbers = list(map(int, input().split(' ')))

def solve(numbers, x):
	n = sum(numbers)
	a = [None for i in range(n)]
	for i in range(n):
		if not numbers[x]:
			return
		a[i] = x
		numbers[x] -= 1
		if not sum(numbers):
			break
		if x and numbers[x - 1]:
			x -= 1
		elif x < 3 and numbers[x + 1]:
			x += 1
		else:
			return None
	return a
for i in range(4):
	sol = solve(list(numbers), i)
	if sol:
		print('YES')
		print(' '.join(map(str, sol)))
		exit(0)
print('NO')


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
(a, b, c, d) = map(int, input().split())
n = a + b + c + d
g = [a, b, c, d]
g.sort()
if g[0] == 0 and g[1] == 0 and (g[2] == 0) and (g[3] != 1):
	print('NO')
	exit()
if n == 1:
	print('YES')
	print(*[0 * a + 1 * b + 2 * c + 3 * d])
	exit()
ans = []
if a == 0 and b == 0 and (abs(c - d) == 1):
	if c >= d:
		for i in range(n):
			if i % 2 == 0:
				ans.append(2)
			else:
				ans.append(3)
	else:
		for i in range(n):
			if i % 2 == 0:
				ans.append(3)
			else:
				ans.append(2)
	print('YES')
	print(*ans)
	exit()
if c == 0 and d == 0 and (abs(a - b) == 1):
	if a >= b:
		for i in range(n):
			if i % 2 == 0:
				ans.append(0)
			else:
				ans.append(1)
	else:
		for i in range(n):
			if i % 2 == 0:
				ans.append(1)
			else:
				ans.append(0)
	print('YES')
	print(*ans)
	exit()
if a >= 0:
	if a == b:
		ans = []
		for i in range(2 * a):
			if i % 2 == 0:
				ans.append(0)
			else:
				ans.append(1)
		b -= a
		cnt = 0
		while True:
			if c == 0 or d == 0:
				break
			if cnt % 2 == 0:
				ans.append(2)
				c -= 1
			else:
				ans.append(3)
				d -= 1
			cnt += 1
		if ans[-1] == 3:
			if c == 1:
				c -= 1
				ans.append(2)
		if ans[-1] == 2:
			if d == 1:
				ans.append(3)
				d -= 1
		if ans[-1] == 1 and c != 0:
			c -= 1
			ans.append(2)
		if c == 0 and d == 0:
			print('YES')
			print(*ans)
		else:
			print('NO')
	elif b > a:
		ans = [1]
		b -= 1
		for i in range(2 * a):
			if i % 2 == 0:
				ans.append(0)
			else:
				ans.append(1)
		b -= a
		cnt = 0
		while True:
			if b == 0 or c == 0:
				break
			if cnt % 2 == 0:
				ans.append(2)
				c -= 1
			if cnt % 2 != 0:
				ans.append(1)
				b -= 1
			cnt += 1
		if ans[-1] == 1 and c == 0 and (b == 0):
			if d != 0:
				print('NO')
				exit()
			print('YES')
			print(*ans)
		elif ans[-1] == 1 and b == 0:
			cnt = 0
			while True:
				if c == 0 or d == 0:
					break
				if cnt % 2 == 0:
					ans.append(2)
					c -= 1
				else:
					ans.append(3)
					d -= 1
				cnt += 1
			if c == 0 and d == 0:
				print('YES')
				print(*ans)
			elif c == 1 and d == 0:
				print('YES')
				print(*[2] + ans)
			elif c == 2 and d == 0:
				print('YES')
				print(*[2] + ans + [2])
			elif c == 0 and d == 1:
				print('YES')
				print(*ans + [3])
			else:
				print('NO')
		elif ans[-1] == 2 and b == 1 and (d != 0):
			print('NO')
		elif ans[-1] == 2 and b == 1 and (d == 0):
			print('YES')
			print(*ans + [1])
		elif ans[-1] == 2 and b == 0:
			cnt = 0
			while True:
				if c == 0 or d == 0:
					break
				if cnt % 2 != 0:
					ans.append(2)
					c -= 1
				else:
					ans.append(3)
					d -= 1
				cnt += 1
			if c == 0 and d == 0:
				print('YES')
				print(*ans)
			elif c == 1 and d == 0:
				print('YES')
				print(*[2] + ans)
			elif c == 0 and d == 1:
				print('YES')
				print(*ans + [3])
			elif c == 2 and d == 0:
				print('YES')
				print(*[2] + ans + [2])
			else:
				print('NO')
		else:
			print('NO')
	elif b == 1 and a == 2 and (c == 0) and (d == 0):
		print('YES')
		print(*[0, 1, 0])
	else:
		print('NO')


import sys
import math, bisect
sys.setrecursionlimit(10 ** 5)
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, defaultdict
I = lambda : int(sys.stdin.readline())
neo = lambda : map(int, sys.stdin.readline().split())
Neo = lambda : list(map(int, sys.stdin.readline().split()))

def check(A, t):
	s = '1' * b + '3' * d
	j = 0
	for i in range(len(A)):
		if (i + t) % 2 == 0:
			A[i] = int(s[j])
			j += 1
	for i in range(1, len(A)):
		if abs(A[i] - A[i - 1]) != 1:
			return 0
	return 1
(a, b, c, d) = neo()
t = a + c + 1
Ans = [-1] * (a + c + t)
s = '0' * a + '2' * c
j = 0
for i in range(len(Ans)):
	if i % 2:
		Ans[i] = int(s[j])
		j += 1
if d + b == a + c - 1:
	A = Ans[1:-1]
	f = check(A, 1)
	if f:
		print('YES')
		print(*A)
	else:
		print('NO')
	exit()
elif d + b == a + c:
	B = Ans[1:]
	C = Ans[:-1]
	f = check(B, 1)
	if f:
		print('YES')
		print(*B)
		exit()
	f = check(C, 0)
	if f:
		print('YES')
		print(*C)
		exit()
	print('NO')
	exit()
elif d + b == a + c + 1:
	D = Ans[:]
	f = check(D, 0)
	if f:
		print('YES')
		print(*D)
		exit()
	print('NO')
	exit()
print('NO')


from sys import stdin
input = stdin.readline
(a, b, c, d) = map(int, input().split())
if abs(a + c - b - d) > 1:
	print('NO')
	exit(0)
ans = [-1]
for i in range(a + c):
	if i < c:
		ans.append(2)
		ans.append(-1)
	else:
		ans.append(0)
		ans.append(-1)

def check(lst):
	pre = -1
	for i in lst:
		if pre != -1 and abs(pre - i) != 1:
			return False
		pre = i
	return True
if a + c <= b + d:
	i = 0
	while i // 2 < b + d:
		if i // 2 < d:
			ans[i] = 3
		else:
			ans[i] = 1
		i += 2
	if check(ans[:a + b + c + d]):
		print('YES')
		print(*ans[:a + b + c + d])
	else:
		print('NO')
else:
	i = 2
	while i // 2 - 1 < b + d:
		if i // 2 - 1 < d:
			ans[i] = 3
		else:
			ans[i] = 1
		i += 2
	if check(ans[1:a + b + c + d + 1]):
		print('YES')
		print(*ans[1:a + b + c + d + 1])
	else:
		print('NO')


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz'
M = 10 ** 9 + 7
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
(c0, c1, c2, c3) = value()
ok = True
tot = c0 + c1 + c2 + c3
M = c0 + c2 + c0 + c2 + 1
ans = [-1] * (c0 + c2 + c0 + c2 + 1)
M = len(ans)
if tot > M or tot < c0 + c2 + c0 + c2 - 1:
	ok = False
for i in range(len(ans)):
	if i % 2:
		if c0:
			c0 -= 1
			ans[i] = 0
		elif c2:
			c2 -= 1
			ans[i] = 2
for i in range(len(ans) - 2, 0, -1):
	if c3 and ans[i - 1] == 2 and (ans[i + 1] == 2):
		c3 -= 1
		ans[i] = 3
if c3 and (len(ans) == 1 or ans[-2] == 2):
	ans[-1] = 3
	c3 -= 1
if c3 and (len(ans) == 1 or ans[1] == 2):
	ans[0] = 3
	c3 -= 1
if c3:
	ok = False
for i in range(2, len(ans)):
	if ans[i] == -1 and c1:
		c1 -= 1
		ans[i] = 1
if c1 and ans[0] == -1:
	ans[0] = 1
	c1 -= 1
if c1:
	ok = False
start = 0
end = len(ans) - 1
while start < len(ans) and ans[start] == -1:
	start += 1
while end >= 0 and ans[end] == -1:
	end -= 1
for i in range(start, end + 1):
	if ans[i] == -1:
		ok = False
if ok:
	print('YES')
	print(*ans[start:end + 1])
else:
	print('NO')


import sys
(a, b, c, d) = map(int, input().split())
x = []
y = []
for i in range(a):
	x.append(0)
for i in range(b):
	y.append(1)
for i in range(c):
	x.append(2)
for i in range(d):
	y.append(3)
p = []
if len(x) < len(y):
	(x, y) = (y, x)
i = 0
j = 0
if len(x) != len(y):
	p.append(x[0])
	j += 1
	(x, y) = (y, x)
while i < len(x) and j < len(y):
	p.append(x[i])
	p.append(y[j])
	i += 1
	j += 1
if len(p) != a + b + c + d:
	print('NO')
	sys.exit(0)
for t in range(len(p) - 1):
	if p[t] - p[t + 1] != 1 and p[t] - p[t + 1] != -1:
		print('NO')
		sys.exit(0)
print('YES')
print(*p)


from copy import copy

def arr_float_inp():
	return [float(s) for s in input().split()]

def arr_int_inp():
	return [int(s) for s in input().split()]

def int_inp():
	return int(input())

def float_inp():
	return float(input())
arr = arr_int_inp()
required_length = sum(arr)
out = []
solution_founded = False
for i in range(4):
	if arr[i] == 0:
		continue
	new_arr = copy(arr)
	prev = i
	new_arr[i] -= 1
	out.append(i)
	while True:
		if prev == 0:
			if new_arr[1] != 0:
				new_arr[1] -= 1
				prev = 1
				out.append(1)
			else:
				break
		elif prev == 1:
			if new_arr[0] != 0:
				new_arr[0] -= 1
				prev = 0
				out.append(0)
			elif new_arr[2] != 0:
				new_arr[2] -= 1
				prev = 2
				out.append(2)
			else:
				break
		elif prev == 2:
			if new_arr[1] != 0:
				new_arr[1] -= 1
				prev = 1
				out.append(1)
			elif new_arr[3] != 0:
				new_arr[3] -= 1
				prev = 3
				out.append(3)
			else:
				break
		elif prev == 3:
			if new_arr[2] != 0:
				new_arr[2] -= 1
				prev = 2
				out.append(2)
			else:
				break
	if len(out) == required_length:
		solution_founded = True
		break
	else:
		out.clear()
if solution_founded:
	print('YES')
	for el in out:
		print(el, end=' ')
else:
	print('NO')


from itertools import combinations
import sys
input = sys.stdin.readline
INF = 10 ** 9
(a, b, c, d) = [int(item) for item in input().split()]
n = a + b + c + d
if n == 1 and a == 1:
	print('YES')
	print(0)
	exit()
elif n == 1 and d == 1:
	print('YES')
	print(3)
	exit()
diff = a + c - (b + d)
if abs(diff) > 1:
	print('NO')
	exit()
if c == 0 and d == 0:
	if a > b:
		ans = [0] * n
		for i in range(b):
			ans[2 * i + 1] = 1
	else:
		ans = [1] * n
		for i in range(a):
			ans[2 * i + 1] = 0
	print('YES')
	print(' '.join([str(item) for item in ans]))
	exit()
if a == 0 and b == 0:
	if c > d:
		ans = [2] * n
		for i in range(d):
			ans[2 * i + 1] = 3
	else:
		ans = [3] * n
		for i in range(c):
			ans[2 * i + 1] = 2
	print('YES')
	print(' '.join([str(item) for item in ans]))
	exit()
if diff == 1:
	if d > c - 1:
		print('NO')
		exit()
	ans = [2] * n
	for i in range(d):
		ans[i * 2 + 1] = 3
	for i in range(d, d + b):
		ans[i * 2 + 1] = 1
	for i in range(c, c + a):
		ans[i * 2] = 0
	print('YES')
	print(' '.join([str(item) for item in ans]))
	exit()
elif diff == -1:
	if a > b - 1:
		print('NO')
		exit()
	ans = [1] * n
	for i in range(a):
		ans[i * 2 + 1] = 0
	for i in range(a, a + c):
		ans[i * 2 + 1] = 2
	for i in range(b, b + d):
		ans[i * 2] = 3
	print('YES')
	print(' '.join([str(item) for item in ans]))
	exit()
elif diff == 0:
	if a > b or d > c:
		print('NO')
		exit()
	ans = [0] * n
	for i in range(a, a + c):
		ans[i * 2] = 2
	for i in range(b):
		ans[i * 2 + 1] = 1
	for i in range(b, b + d):
		ans[i * 2 + 1] = 3
	print('YES')
	print(' '.join([str(item) for item in ans]))
	exit()


a = list(map(int, input().split()))
ref = [0, 1, 2, 3]
x = sum(a)
for i in range(4):
	b = a[:]
	res = []
	for j in range(x):
		b[i] -= 1
		res.append(ref[i])
		if i == 0:
			i = 1
		elif i == 3:
			i = 2
		elif i == 1:
			if b[0] > 0:
				i = 0
			else:
				i = 2
		elif b[3] > 0:
			i = 3
		else:
			i = 1
	if max(b) == 0 and min(b) == 0:
		print('YES')
		print(*res)
		exit()
print('NO')


import sys
import math
from collections import defaultdict, Counter, deque
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(1):
	(a, b, c, d) = map(int, input().split())
	if a > b:
		if c > 0 or d > 0 or a - b > 1:
			print('NO')
		else:
			print('YES')
			ans = [0] + [1, 0] * b
			print(*ans)
		continue
	if a == b:
		ans = [0, 1] * a
		a = 0
	else:
		ans = [1] + [0, 1] * a
		a = b - a - 1
	b = c
	if a >= b and a != 0:
		if d > 0 or a > b:
			print('NO')
		else:
			print('YES')
			ans += [2, 1] * a
			print(*ans)
		continue
	ans += [2, 1] * a
	a = b - a
	b = d
	if b > a:
		if ans or b - a > 1:
			print('NO')
		else:
			print('YES')
			ans = [3] + [2, 3] * a
			print(*ans)
		continue
	elif a - b > 1:
		if ans and ans[0] == 1:
			a -= 1
			ans += [2, 1]
			ans = ans[1:]
		if a - b > 1:
			print('NO')
			continue
	print('YES')
	ans += [2, 3] * b
	a -= b
	if a:
		ans += [2]
	print(*ans)


import sys
reader = (map(int, line.split()) for line in sys.stdin)
input = reader.__next__

def beatSeq(a, b, c, d):
	left = []
	while a > 0 and b > 0:
		left.append(0)
		left.append(1)
		a -= 1
		b -= 1
	if a > 1:
		return None
	elif a == 1:
		if c + d > 0:
			return None
		else:
			left.append(0)
			return left
	right = []
	while d > 0 and c > 0:
		right.append(3)
		right.append(2)
		d -= 1
		c -= 1
	if d > 1:
		return None
	elif d == 1:
		if left or a + b > 0:
			return None
		else:
			right.append(3)
			return right
	while b > 0 and c > 0:
		left.append(2)
		left.append(1)
		b -= 1
		c -= 1
	if max(b, c) > 1:
		return None
	elif b > 0:
		left = [1] + left
	elif c > 0:
		right = [2] + right
	return left + [r for r in reversed(right)]
(a, b, c, d) = input()
ans = beatSeq(a, b, c, d)
if ans is None:
	print('NO')
else:
	print('YES')
	print(*ans)


def find_start_old(freq):
	largest = max(freq)
	if freq.count(largest) == 1 or freq[0] == largest:
		return freq.index(largest)
	if freq[-1] == largest:
		return 3
	if freq[0] > freq[-1]:
		return 2
	return 1

def find_start(freq):
	temp = [0] + freq + [0]
	diff = [temp[i] - temp[i - 1] - temp[i + 1] for i in range(1, len(temp) - 1)]
	return diff.index(max(diff))

def populate(freq, start):
	result = []
	while freq.count(0) != 4:
		if freq[start] == 0:
			return (False, [])
		result.append(str(start))
		freq[start] -= 1
		if start == 0 or (start == 1 and freq[0] == 0) or (start == 2 and freq[3] != 0):
			start += 1
		else:
			start -= 1
	return (True, ' '.join(result))
freq = [int(i) for i in input().split()]
for i in range(4):
	(exists, string) = populate(freq[:], i)
	if exists:
		print('YES')
		print(string)
		break
if not exists:
	print('NO')


import sys

def main():
	(a, b, c, d) = get_ints()
	if a + b + c + d == 1:
		print('YES')
		if a == 1:
			print(0)
			return
		if b == 1:
			print(1)
			return
		if c == 1:
			print(2)
			return
		if d == 1:
			print(3)
			return

	def quit():
		print('NO')
		exit(0)
	ans = []
	if b > a:
		ans.append(1)
		b -= 1
	while a > 0 and b > 0:
		ans.append(0)
		ans.append(1)
		a -= 1
		b -= 1
	if a > 0 and c != 0 and (d != 0):
		quit()
	while b > 0 and c > 0:
		ans.append(2)
		ans.append(1)
		c -= 1
		b -= 1
	if b > 0:
		quit()
	if c == 0 and d != 0:
		quit()
	while c > 0 and d > 0:
		ans.append(2)
		ans.append(3)
		c -= 1
		d -= 1
	if c:
		ans.append(2)
		c -= 1
	if c == 1 and ans[0] == 1:
		ans.insert(0, 2)
		c -= 1
	if d == 1 and ans[0] == 2:
		ans.insert(0, 3)
		d -= 1
	if a == 1 and b == 0 and (c == 0) and (d == 0):
		a -= 1
		ans.append(0)
	for i in range(1, len(ans)):
		if abs(ans[i - 1] - ans[i]) != 1:
			quit()
	if a or b or c or d:
		quit()
	print('YES')
	print(*ans)
get_array = lambda : list(map(int, sys.stdin.readline().split()))
get_ints = lambda : map(int, sys.stdin.readline().split())
input = lambda : sys.stdin.readline().strip()
main()


from sys import stdin, stdout
read = lambda : map(int, stdin.readline().split())
I = lambda : stdin.readline()
(a, b, c, d) = read()
ind = 0 if a + c < b + d else 1
res = [0 for i in range(a)] + [2 for i in range(c)]
for i in range(b):
	res.insert(ind, 1)
	ind += 2
for j in range(d):
	res.insert(ind, 3)
	ind += 2
for i in range(1, len(res)):
	if abs(res[i] - res[i - 1]) != 1:
		print('NO')
		break
else:
	print('YES')
	print(*res)


T = 1
MAX = 3 * 10 ** 5 + 10
for t in range(1, T + 1):
	(a, b, c, d) = map(int, input().split())
	(a_, b_, c_, d_) = (a, b, c, d)
	if a == 0 and b == 0:
		if abs(c - d) > 1:
			print('NO')
			continue
		if c > d:
			print('YES')
			ans = '2 ' * (c - d > 0) + '3 2 ' * d
		else:
			print('YES')
			ans = '3 ' * (d - c > 0) + '2 3 ' * c
	elif d == 0 and c == 0:
		if abs(a - b) > 1:
			print('NO')
			continue
		if a > b:
			print('YES')
			ans = '0 ' * (a - b > 0) + '1 0 ' * b
		else:
			print('YES')
			ans = '1 ' * (b - a > 0) + '0 1 ' * a
	else:
		if b < a or c < d:
			print('NO')
			continue
		b -= a
		c -= d
		minval = min(b, c)
		b -= minval
		c -= minval
		if b > 1 or c > 1:
			print('NO')
			continue
		print('YES')
		ans = '1 ' * b + '0 1 ' * a + '2 1 ' * minval + '2 3 ' * d + '2 ' * c
	print(ans)
	x = list(map(int, ans.split()))
	assert x.count(0) == a_ and x.count(1) == b_ and (x.count(2) == c_) and (x.count(3) == d_)
	for i in range(1, len(x)):
		assert abs(x[i] - x[i - 1]) == 1


from sys import stdin, stdout, setrecursionlimit
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from random import seed, randint
from datetime import datetime
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
from collections import defaultdict as dd
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def def_value():
	return 0
a = lmp()
a = [0] + a + [0]
b = a.copy()
n = sum(a)
f2 = False
for kkk in range(4):
	a = b.copy()
	if a[kkk + 1] > 0:
		ans = l1d(n, -1)
		ans[0] = kkk
		a[kkk + 1] -= 1
		i = 1
		flg = False
		while i < n:
			if a[ans[i - 1]] > 0:
				ans[i] = ans[i - 1] - 1
				a[ans[i - 1]] -= 1
			elif a[ans[i - 1] + 2] > 0:
				ans[i] = ans[i - 1] + 1
				a[ans[i - 1] + 2] -= 1
			else:
				flg = True
				break
			i += 1
		if not flg:
			print('YES')
			print(*ans)
			f2 = True
			break
if not f2:
	print('NO')


import sys
ip = lambda : sys.stdin.readline().rstrip()
(a, b, c, d) = map(int, ip().split())
ans = [-1] * (a + b + c + d)
if a - b > 1 or d - c > 1:
	print('NO')
elif a - b == 1:
	if c or d:
		print('NO')
	else:
		print('YES')
		print('0 1 ' * b, end='')
		print('0')
elif d - c == 1:
	if a or b:
		print('NO')
	else:
		print('YES')
		print('3 2 ' * c, end='')
		print('3')
else:
	(ct1, ct2) = (b - a, c - d)
	if abs(ct1 - ct2) > 1:
		print('NO')
		sys.exit(0)
	else:
		print('YES')
	end = ''
	if ct1 > ct2:
		print('1 ', end='')
		ct1 -= 1
	elif ct2 > ct1:
		end = '2'
	print('0 1 ' * a, end='')
	print('2 1 ' * ct1, end='')
	print('2 3 ' * d, end='')
	print(end)


import sys
input = sys.stdin.readline
(A, B, C, D) = map(int, input().split())
if A + C == B + D:
	if B >= A and C >= D:
		print('YES')
		ans = []
		for _ in range(D):
			ans.append(3)
			ans.append(2)
		for _ in range(C - D):
			ans.append(1)
			ans.append(2)
		for _ in range(A):
			ans.append(1)
			ans.append(0)
		print(' '.join([str(a) for a in ans]))
	else:
		print('NO')
elif A + C == B + D + 1:
	if B >= A and C >= D + 1:
		print('YES')
		ans = []
		for _ in range(A):
			ans.append(0)
			ans.append(1)
		for _ in range(B - A):
			ans.append(2)
			ans.append(1)
		for _ in range(D):
			ans.append(2)
			ans.append(3)
		ans.append(2)
		print(' '.join([str(a) for a in ans]))
	elif A == B + 1 and C == 0 and (D == 0):
		print('YES')
		ans = []
		for _ in range(B):
			ans.append(0)
			ans.append(1)
		ans.append(0)
		print(' '.join([str(a) for a in ans]))
	else:
		print('NO')
elif B + D == A + C + 1:
	if B >= A + 1 and C >= D:
		print('YES')
		ans = []
		for _ in range(D):
			ans.append(3)
			ans.append(2)
		for _ in range(C - D):
			ans.append(1)
			ans.append(2)
		for _ in range(A):
			ans.append(1)
			ans.append(0)
		ans.append(1)
		print(' '.join([str(a) for a in ans]))
	elif D == C + 1 and A == 0 and (B == 0):
		print('YES')
		ans = []
		for _ in range(C):
			ans.append(3)
			ans.append(2)
		ans.append(3)
		print(' '.join([str(a) for a in ans]))
	else:
		print('NO')
else:
	print('NO')


(a, b, c, d) = map(int, input().split())
if a == b and b == 0:
	if abs(c - d) > 1:
		print('NO')
	else:
		print('YES')
		if c > d:
			for i in range(d):
				print('2 3', end=' ')
			print('2')
		elif d > c:
			for i in range(c):
				print('3 2', end=' ')
			print('3')
		else:
			for i in range(c):
				print('3 2', end=' ')
			print()
elif b == c and c == d and (d == 0):
	if a == 1:
		print('YES')
		print(0)
	else:
		print('NO')
elif a == c and c == d and (d == 0):
	if b == 1:
		print('YES')
		print(1)
	else:
		print('NO')
elif a == b and b == d and (d == 0):
	if c == 1:
		print('YES')
		print(2)
	else:
		print('NO')
elif a == b and b == c and (c == 0):
	if d == 1:
		print('YES')
		print(3)
	else:
		print('NO')
else:
	ans = ''
	flag = True
	flag_1 = False
	if b >= a:
		if b > a:
			ans += '1 '
			flag = False
			flag_1 = True
		for i in range(a):
			ans += '0 1 '
			flag = False
		b -= a + 1
		if b <= 0:
			if d == c - 1 or d == c:
				for i in range(d):
					ans += '2 3 '
				if d == c - 1:
					ans += '2'
				print('YES')
				print(ans)
			elif d + 2 == c and flag_1:
				for i in range(d):
					ans += '2 3 '
				print('YES')
				print('2 ' + ans + '2')
			elif flag:
				if d == c + 1:
					for i in range(c):
						ans += '3 2 '
					ans += '3'
					print('YES')
					print(ans)
			else:
				print('NO')
		elif c >= b:
			for i in range(b):
				ans += '2 1 '
			c -= b
			if c >= 1:
				ans += '2 '
				c -= 1
			if d >= c:
				if d == c or d == c + 1:
					print('YES')
					for i in range(c):
						ans += '3 2 '
					if d == c + 1:
						ans += '3'
					print(ans)
				else:
					print('NO')
			elif d == 0 and c == 1:
				print('YES')
				print('2 ' + ans)
			elif d + 1 == c:
				print('YES')
				for i in range(d):
					ans += '3 2 '
				print('2 ' + ans)
			else:
				print('NO')
		else:
			print('NO')
	elif c == d and d == 0:
		if a == b + 1:
			print('YES')
			print('0', end=' ')
			for i in range(b):
				print('1 0', end=' ')
			print()
		else:
			print('NO')
	else:
		print('NO')


(a, b, c, d) = map(int, input().split())
if abs(a + c - b - d) <= 1 and b >= a and (c >= d):
	print('YES')
	if a + c > b + d:
		for i in range(a):
			print(0, 1, end=' ')
		for i in range(b - a):
			print(2, 1, end=' ')
		for i in range(d):
			print(2, 3, end=' ')
		print(2)
	elif a + c == b + d:
		for i in range(a):
			print(0, 1, end=' ')
		for i in range(b - a):
			print(2, 1, end=' ')
		for i in range(d):
			print(2, 3, end=' ')
	elif a + c < b + d:
		for i in range(d):
			print(3, 2, end=' ')
		for i in range(c - d):
			print(1, 2, end=' ')
		for i in range(a):
			print(1, 0, end=' ')
		print(1)
elif a == 0 and b == 0 and (d - c == 1):
	print('YES')
	for i in range(c):
		print(3, 2, end=' ')
	print(3)
elif d == 0 and c == 0 and (a - b == 1):
	print('YES')
	for i in range(b):
		print(0, 1, end=' ')
	print(0)
else:
	print('NO')


(a, b, c, d) = [int(x) for x in input().split()]
dn = {0: a, 1: b, 2: c, 3: d}
total = a + b + c + d
flag = 1
for i in range(4):
	if dn[i] == 0:
		continue
	soln = []
	soln.append(i)
	td = dn.copy()
	td[i] -= 1
	last = i
	for j in range(total - 1):
		if td.get(last - 1, 0):
			soln.append(last - 1)
			td[last - 1] -= 1
			last = last - 1
		elif td.get(last + 1, 0):
			soln.append(last + 1)
			td[last + 1] -= 1
			last = last + 1
		else:
			break
	if len(soln) == total:
		print('YES')
		for i in soln:
			print(i, end=' ')
		print()
		flag = 0
		break
if flag:
	print('NO')


str1 = input()

def go(x):
	s = [int(i) for i in str1.split()]
	res = []
	while sum(s) > 0:
		res.append(x)
		s[x] -= 1
		if s[x] < 0:
			return
		if x == 0:
			x = 1
		elif x == 1:
			if s[0] < s[1] or s[0] == 0:
				x = 2
			else:
				x = 0
		elif x == 2:
			if s[3] < s[2] or s[3] == 0:
				x = 1
			else:
				x = 3
		elif x == 3:
			x = 2
	return res
for start in range(4):
	r = go(start)
	if r:
		print('YES')
		print(*r)
		break
else:
	print('NO')


(a, b, c, d) = map(int, input().split())
if a > b and (d != 0 or c != 0):
	print('NO')
elif a == 1 and b == 0 and (c == 0) and (d == 0):
	print('YES')
	print(0)
elif a == 0 and b == 1 and (c == 0) and (d == 0):
	print('YES')
	print(1)
elif a == 0 and b == 0 and (c == 1) and (d == 0):
	print('YES')
	print(2)
elif a == 0 and b == 0 and (c == 0) and (d == 1):
	print('YES')
	print(3)
elif a == 0 and b == 0:
	ans = []
	if d == c:
		for i in range(c):
			ans.append(2)
			ans.append(3)
		print('YES')
		print(*ans)
	elif c - d == 1:
		for i in range(d):
			ans.append(2)
			ans.append(3)
		ans.append(2)
		print('YES')
		print(*ans)
	elif d - c == 1:
		for i in range(c):
			ans.append(3)
			ans.append(2)
		ans.append(3)
		print('YES')
		print(*ans)
	else:
		print('NO')
elif a == b:
	ans = []
	if d == c or d == c - 1:
		for i in range(a):
			ans.append(0)
			ans.append(1)
		for i in range(d):
			ans.append(2)
			ans.append(3)
		if d == c - 1:
			ans.append(2)
		print('YES')
		print(*ans)
	else:
		print('NO')
else:
	ans = []
	if b - a > c - d:
		for i in range(a):
			ans.append(1)
			ans.append(0)
		ans.append(1)
		if c >= b - a - 1:
			for i in range(b - a - 1):
				ans.append(2)
				ans.append(1)
			if d == c - (b - a - 1) or d == c - (b - a - 1) - 1:
				for i in range(d):
					ans.append(2)
					ans.append(3)
				if d == c - (b - a - 1) - 1:
					ans.append(2)
				print('YES')
				print(*ans)
			else:
				print('NO')
		else:
			print('NO')
	else:
		for i in range(min(a, b)):
			ans.append(0)
			ans.append(1)
		if c >= b - a and c != 0:
			for i in range(b - a):
				ans.append(2)
				ans.append(1)
			if d == c - (b - a) or d == c - (b - a) - 1:
				for i in range(d):
					ans.append(2)
					ans.append(3)
				if d == c - (b - a) - 1:
					ans.append(2)
				print('YES')
				print(*ans)
			else:
				print('NO')
		elif a - b == 1:
			ans.append(0)
			print('YES')
			print(*ans)
		else:
			print('NO')


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
(a, b, c, d) = mp()
if (a + c) % 2 != (b + d) % 2:
	if abs(a + c - b - d) != 1:
		print('NO')
	else:
		if a + c > b + d:
			ml = []
			n = a + b + c + d
			for i in range(n):
				if i % 2:
					if b > 0:
						ml.append(1)
						b -= 1
					else:
						ml.append(3)
				elif a > 0:
					ml.append(0)
					a -= 1
				else:
					ml.append(2)
		else:
			ml = []
			n = a + b + c + d
			for i in range(n):
				if i % 2 == 0:
					if b > 0:
						ml.append(1)
						b -= 1
					else:
						ml.append(3)
				elif a > 0:
					ml.append(0)
					a -= 1
				else:
					ml.append(2)
		t = True
		for i in range(1, n):
			if ml[i] - ml[i - 1] not in [-1, 1]:
				t = False
				break
		if t:
			print('YES')
			print(*ml)
		else:
			print('NO')
elif a + c != b + d:
	print('NO')
else:
	arr1 = []
	arr2 = []
	n = a + b + c + d
	(a1, b1, c1, d1) = (a, b, c, d)
	for i in range(n):
		if i % 2 == 0:
			arr1.append(0 if a > 0 else 2)
			a -= 1
			arr2.append(1 if b1 > 0 else 3)
			b1 -= 1
		else:
			arr1.append(1 if b > 0 else 3)
			b -= 1
			arr2.append(0 if a1 > 0 else 2)
			a1 -= 1
	t1 = True
	t2 = True
	for i in range(1, n):
		if abs(arr1[i] - arr1[i - 1]) != 1:
			t1 = False
		if abs(arr2[i] - arr2[i - 1]) != 1:
			t2 = False
		if not t1 and (not t2):
			break
	if t1:
		print('YES')
		print(*arr1)
	elif t2:
		print('YES')
		print(*arr2)
	else:
		print('NO')


from math import *
from collections import *
import sys
sys.setrecursionlimit(10 ** 9)
(a, b, c, d) = map(int, input().split())
ans = []
flag = 0
while a > 0:
	ans.append(0)
	a -= 1
	if b > 0:
		ans.append(1)
		b -= 1
if b < 0:
	flag = 1
while b > 0:
	if c > 0:
		ans.append(2)
		c -= 1
	ans.append(1)
	b -= 1
if c < 0:
	flag = 1
while c > 0:
	ans.append(2)
	c -= 1
	if d > 0:
		ans.append(3)
		d -= 1
if d != 0 or c != 0:
	if d == 1:
		ans.insert(0, 1)
		n = len(ans)
		for i in range(n - 1, -1, -1):
			if ans[i] == 1:
				ans[i] = 3
				break
	else:
		flag = 1
n = len(ans)
if n > 1 and ans[n - 1] == 1 and (ans[n - 2] == 1):
	ans.pop()
	ans.insert(0, 1)
for i in range(n - 1):
	if abs(ans[i + 1] - ans[i]) != 1:
		flag = 1
		break
if flag == 1:
	print('NO')
else:
	print('YES')
	for i in ans:
		print(i, end=' ')
	print()


def printres(res):
	print('YES')
	print(' '.join(map(str, res)))

def main():
	cc = [int(a) for a in input().split()]
	nz = []
	for (i, c) in enumerate(cc):
		if c > 0:
			nz.append(i)
	if len(nz) == 1:
		if cc[nz[0]] == 1:
			printres([nz[0]])
		else:
			print('NO')
		return
	elif len(nz) == 2:
		if nz[1] != nz[0] + 1:
			print('NO')
			return
		df = cc[nz[1]] - cc[nz[0]]
		if abs(df) > 1:
			print('NO')
			return
		if df == 1:
			printres([nz[1]] + [nz[0], nz[1]] * cc[nz[0]])
		elif df == 0:
			printres([nz[0], nz[1]] * cc[nz[0]])
		else:
			printres([nz[0], nz[1]] * cc[nz[1]] + [nz[0]])
		return
	elif len(nz) == 3:
		if nz[2] != nz[1] + 1 or nz[1] != nz[0] + 1:
			print('NO')
			return
		df = cc[nz[0]] + cc[nz[2]] - cc[nz[1]]
		if abs(df) > 1:
			print('NO')
			return
		if df == 1:
			printres([nz[0], nz[1]] * cc[nz[0]] + [nz[2], nz[1]] * (cc[nz[2]] - 1) + [nz[2]])
		elif df == 0:
			printres([nz[0], nz[1]] * cc[nz[0]] + [nz[2], nz[1]] * cc[nz[2]])
		else:
			printres([nz[1]] + [nz[0], nz[1]] * cc[nz[0]] + [nz[2], nz[1]] * cc[nz[2]])
		return
	else:
		df = cc[0] - cc[1] + cc[2] - cc[3]
		if abs(df) > 1:
			print('NO')
			return
		y = min(cc[1] - cc[0], cc[2] - cc[3])
		if y < 0:
			print('NO')
			return
		base = [0, 1] * cc[0] + [2, 1] * y + [2, 3] * cc[3]
		if df == 1:
			printres(base + [2])
		elif df == 0:
			printres(base)
		else:
			printres([1] + base)
		return
main()


def getAns(a, b, c, d):
	if a > b:
		if a - b == 1 and c == 0 and (d == 0):
			print('YES')
			li = []
			li.append(0)
			for i in range(b):
				li.append(1)
				li.append(0)
			print(*li)
			return
		print('NO')
		return
	elif d > c:
		if d - c == 1 and a == 0 and (b == 0):
			print('YES')
			li = []
			li.append(3)
			for i in range(c):
				li.append(2)
				li.append(3)
			print(*li)
			return
		print('NO')
		return
	ogB = b
	ogC = c
	b -= a
	c -= d
	li = []
	diff = abs(b - c)
	if diff <= 1:
		print('YES')
		for i in range(d):
			li.append(3)
			li.append(2)
		for i in range(a):
			li.append(1)
			li.append(0)
		if b > c:
			for i in range(c):
				li.append(1)
				li.append(2)
			li.append(1)
		else:
			for i in range(b):
				li.append(1)
				li.append(2)
			if c > b:
				li.insert(0, 2)
		print(*li)
	else:
		print('NO')
asdf = [int(x) for x in input().split(' ')]
getAns(asdf[0], asdf[1], asdf[2], asdf[3])


def make(num, a, b):
	arr = [a if i % 2 == 0 else b for i in range(2 * num)]
	return arr

def is_valid(a, n):
	for i in range(1, n):
		if abs(a[i] - a[i - 1]) != 1:
			return False
	return True

def solve(a):
	ans = []
	n = len(a)
	flg = True
	for i in range(n - 1):
		if a[i] == 0:
			continue
		if a[i + 1] < a[i] - 1:
			return (False, None)
			break
		arr = make(a[i] - 1, i, i + 1)
		arr.append(i)
		ans.extend(arr)
		a[i + 1] -= a[i] - 1
		a[i] = 0
	if a[-1] not in [0, 1]:
		return (False, None)
	elif a[-1] == 1:
		ans.append(n - 1)
	flg = is_valid(ans, len(ans))
	if flg == False:
		return (flg, None)
	return (flg, ans)
a = list(map(int, input().split()))
cur = 0
while a[0] == 0:
	a.pop(0)
	cur += 1
b = [x for x in a]
(flg, ans) = solve(a)
if flg == False:
	if len(b) > 1 and b[1] > 0:
		b[1] -= 1
		(flg, ans) = solve(b)
	if flg == False:
		print('NO')
	else:
		print('YES')
		ans = [1] + ans
		print(' '.join([str(x + cur) for x in ans]))
else:
	print('YES')
	print(' '.join([str(x + cur) for x in ans]))


(a, b, c, d) = map(int, input().split())
if a > b + 1 or d > c + 1:
	print('NO')
elif a == b + 1:
	if c == d == 0:
		print('YES')
		print('0 1 ' * b + ' 0')
	else:
		print('NO')
elif d == c + 1:
	if a == b == 0:
		print('YES')
		print('3 2 ' * c + ' 3')
	else:
		print('NO')
else:
	b -= a
	c -= d
	k = min(b, c)
	if abs(b - c) >= 2:
		print('NO')
	else:
		(xb, xc) = (b - k, c - k)
		ans = '1' * xb + '01' * a + '21' * k + '23' * d + '2' * xc
		print('YES')
		print(' '.join(ans))


(a, b, c, d) = list(map(int, input().split()))
b -= a
c -= d
arr = []
k = True
if b >= 0 and c >= 0:
	if a == 0 and b == 0 and (c == 1):
		print('YES')
		arr.append(2)
		for i in range(d):
			arr.append(3)
			arr.append(2)
		print(*arr, sep=' ')
		k = False
	elif d == 0 and c == 0 and (b == 1):
		print('YES')
		arr.append(1)
		for i in range(a):
			arr.append(0)
			arr.append(1)
		print(*arr, sep=' ')
		k = False
	elif b == c and k:
		print('YES')
		if b == 0:
			for i in range(a):
				arr.append(0)
				arr.append(1)
			for i in range(d):
				arr.append(2)
				arr.append(3)
		else:
			for i in range(a):
				arr.append(1)
				arr.append(0)
			for i in range(b):
				arr.append(1)
				arr.append(2)
			for i in range(d):
				arr.append(3)
				arr.append(2)
		print(*arr, sep=' ')
	elif c - b == 1 and k:
		print('YES')
		if a > 0:
			for i in range(a - 1):
				arr.append(0)
				arr.append(1)
			arr.append(0)
			arr.append(1)
			arr.append(2)
		else:
			arr.append(2)
		for i in range(c - 1):
			arr.append(1)
			arr.append(2)
		for i in range(d):
			arr.append(3)
			arr.append(2)
		print(*arr, sep=' ')
	elif b - c == 1 and k:
		print('YES')
		for i in range(a):
			arr.append(1)
			arr.append(0)
		for i in range(b - 1):
			arr.append(1)
			arr.append(2)
		arr.append(1)
		if d > 0:
			arr.append(2)
			for i in range(d - 1):
				arr.append(3)
				arr.append(2)
			arr.append(3)
		print(*arr, sep=' ')
	else:
		print('NO')
elif b == -1 and d == 0 and (c == 0):
	print('YES')
	for i in range(a - 1):
		arr.append(0)
		arr.append(1)
	arr.append(0)
	print(*arr, sep=' ')
elif a == 0 and b == 0 and (c == -1):
	print('YES')
	for i in range(d - 1):
		arr.append(3)
		arr.append(2)
	arr.append(3)
	print(*arr, sep=' ')
else:
	print('NO')


def solve1(arr, start):
	wynik = []
	id = start
	while True:
		if arr[id] == 0:
			if sum(arr) == 0:
				break
			return 'NO\n'
		arr[id] -= 1
		wynik.append(str(id))
		if id == 0:
			id = 1
		elif id == 1:
			id = 0 if arr[0] > 0 else 2
		elif id == 2:
			id = 1 if arr[1] > 0 else 3
		elif id == 3:
			id = 2
	return 'YES\n' + ' '.join(wynik)

def solve():
	arr = [int(a) for a in input().split(' ')]
	res = ''
	for i in range(4):
		res = solve1(arr.copy(), i)
		if not res.startswith('NO'):
			break
	return res
print(solve())


import sys
input = sys.stdin.readline
(a, b, c, d) = map(int, input().split())
res = 0
str1 = []
str2 = []
str3 = []
if a > 0:
	str1.append('0 ')
	a -= 1
if d > 0:
	str2.append('3 ')
	d = d - 1
res = 0
while a > 0:
	if b > 0:
		str1.append('1 0 ')
		a -= 1
		b -= 1
	else:
		res = -1
		break
while d > 0:
	if c > 0:
		str2.append('2 3 ')
		c -= 1
		d -= 1
	else:
		res = -1
		break
if len(str1) != 0 and len(str2) != 0 and (b == 0 or c == 0):
	res = -1
if len(str1) == 0 and len(str2) != 0 and (c == 0 and b != 0):
	res = -1
if len(str1) != 0 and len(str2) == 0 and (b == 0 and c != 0):
	res = -1
while b > 0 and c > 0:
	str3.append('1 2 ')
	b -= 1
	c -= 1
if b > 0:
	if len(str1) != 0:
		str4 = ['1 ']
		str4.extend(str1)
		str1 = str4
		b -= 1
	if b > 0 and len(str3) == 0:
		str1.append('1 ')
		b -= 1
if b > 0:
	if len(str2) == 0 and len(str3) != 0:
		str3.append('1 ')
		b -= 1
if b > 0:
	res = -1
if c > 0:
	if len(str2) != 0:
		str2.append('2 ')
		c -= 1
	if len(str3) == 0 and c > 0:
		str3.append('2 ')
		c -= 1
if c > 0:
	if len(str1) == 0 and len(str3) != 0 and (str3[0] != '2 '):
		str4 = ['2 ']
		str4.extend(str3)
		str3 = str4
		c -= 1
if c > 0:
	res = -1
ans = ''
if res == 0:
	str1.extend(str3)
	str1.extend(str2)
	print('YES')
	ans = ans.join(str1)
	print(ans)
else:
	print('NO')


(n0, n1, n2, n3) = map(int, input().split())
if n2 + n3 == 0:
	if n0 == n1:
		print('YES')
		for i in range(n0):
			print(0, 1, end=' ')
	elif abs(n0 - n1) == 1:
		print('YES')
		if n0 < n1:
			print(1, end=' ')
			for i in range(n0):
				print(0, 1, end=' ')
		else:
			print(0, end=' ')
			for i in range(n1):
				print(1, 0, end=' ')
	else:
		print('NO')
elif n0 + n1 == 0:
	if n2 == n3:
		print('YES')
		for i in range(n2):
			print(2, 3, end=' ')
	elif abs(n2 - n3) == 1:
		print('YES')
		if n2 < n3:
			print(3, end=' ')
			for i in range(n2):
				print(2, 3, end=' ')
		else:
			print(2, end=' ')
			for i in range(n3):
				print(3, 2, end=' ')
	else:
		print('NO')
elif n0 + n3 == 0:
	if n1 == n2:
		print('YES')
		for i in range(n1):
			print(2, 1, end=' ')
	elif abs(n2 - n1) == 1:
		print('YES')
		if n2 < n1:
			print(1, end=' ')
			for i in range(n2):
				print(2, 1, end=' ')
		else:
			print(2, end=' ')
			for i in range(n1):
				print(1, 2, end=' ')
	else:
		print('NO')
elif n0 <= n1 and n3 <= n2 and (n1 - n0 == n2 - n3):
	print('YES')
	for j in range(n0):
		print(0, 1, end=' ')
	for k in range(n1 - n0):
		print(2, 1, end=' ')
	for l in range(n3):
		print(2, 3, end=' ')
elif n0 <= n1 and n3 <= n2 and (n1 - n0 == n2 - n3 + 1):
	print('YES')
	print(1, end=' ')
	for j in range(n0):
		print(0, 1, end=' ')
	for k in range(n2 - n3):
		print(2, 1, end=' ')
	for l in range(n3):
		print(2, 3, end=' ')
elif n0 <= n1 and n3 <= n2 and (n1 - n0 + 1 == n2 - n3):
	print('YES')
	for j in range(n0):
		print(0, 1, end=' ')
	for k in range(n1 - n0):
		print(2, 1, end=' ')
	for l in range(n3):
		print(2, 3, end=' ')
	print(2)
else:
	print('NO')


(a, b, c, d) = map(int, input().split())
p = 0
e = []
if a > b:
	if c == 0 and d == 0 and (a == b + 1):
		for j in range(a + b):
			if j % 2 == 0:
				e.append(0)
			else:
				e.append(1)
	else:
		p = 1
elif d > c:
	if a == 0 and b == 0 and (d == c + 1):
		for j in range(c + d):
			if j % 2 == 0:
				e.append(3)
			else:
				e.append(2)
	else:
		p = 1
else:
	g = []
	f = []
	i = []
	for j in range(2 * a):
		if j % 2 == 0:
			g.append(0)
		else:
			g.append(1)
	for j in range(2 * d):
		if j % 2 == 0:
			f.append(2)
		else:
			f.append(3)
	b += -a
	c += -d
	if abs(b - c) > 1:
		p = 1
	else:
		if abs(b - c) == 0:
			for j in range(b + c):
				if j % 2 == 0:
					i.append(2)
				else:
					i.append(1)
		if b == c + 1:
			for j in range(2 * c):
				if j % 2 == 0:
					i.append(2)
				else:
					i.append(1)
			g.insert(0, 1)
		elif c == b + 1:
			for j in range(2 * b):
				if j % 2 == 0:
					i.append(2)
				else:
					i.append(1)
			f.append(2)
	e = g + i + f
if p == 1:
	print('NO')
else:
	print('YES')
	print(*e)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(a, b, c, d) = map(int, input().split())
block1 = []
block2 = []
block3 = []
for s in range(min(a, b)):
	block1.append('0')
	block1.append('1')
	a -= 1
	b -= 1
for s in range(min(c, d)):
	block3.append('2')
	block3.append('3')
	c -= 1
	d -= 1
for s in range(min(b, c)):
	block2.append('2')
	block2.append('1')
	b -= 1
	c -= 1
for s in range(min(a, 1)):
	block1.append('0')
	a -= 1
for s in range(min(b, 1)):
	block1 = ['1'] + block1
	b -= 1
for s in range(min(c, 1)):
	block3.append('2')
	c -= 1
for s in range(min(d, 1)):
	block3 = ['3'] + block3
	d -= 1
if a > 0 or b > 0 or c > 0 or (d > 0):
	print('NO')
else:
	outy = block1 + block2 + block3
	broke = False
	for s in range(1, len(outy)):
		if abs(int(outy[s]) - int(outy[s - 1])) == 1:
			continue
		else:
			broke = True
			break
	if broke == False:
		print('YES')
		print(' '.join(outy))
	else:
		print('NO')


from sys import stdin

def iinput():
	return int(stdin.readline())

def sinput():
	return input()

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
a = linput()
ref = [0, 1, 2, 3]
x = sum(a)
for i in range(4):
	b = a[:]
	seq = []
	for j in range(x):
		b[i] -= 1
		seq.append(ref[i])
		if i == 0:
			i = 1
		elif i == 3:
			i = 2
		elif i == 1:
			if b[0] > 0:
				i = 0
			else:
				i = 2
		elif b[3] > 0:
			i = 3
		else:
			i = 1
	if max(b) == 0 and min(b) == 0:
		print('YES')
		print(*seq)
		exit()
print('NO')


import sys
input = sys.stdin.buffer.readline
from collections import defaultdict

def getlist():
	return list(map(int, input().split()))

def main():
	(a, b, c, d) = getlist()
	if abs(a + c - b - d) > 1:
		print('NO')
		return
	if c == 0 and d == 0:
		if a == b + 1:
			ans = []
			for i in range(b):
				ans.append('0')
				ans.append('1')
			ans.append('0')
			judge = 'YES'
			print(judge)
			print(' '.join(ans))
			return
	if a == 0 and b == 0:
		if c + 1 == d:
			ans = []
			for i in range(c):
				ans.append('3')
				ans.append('2')
			ans.append('3')
			judge = 'YES'
			print(judge)
			print(' '.join(ans))
			return
	if a > b:
		print('NO')
		return
	if c < d:
		print('NO')
		return
	judge = 'NO'
	if a + c == b + d + 1:
		judge = 'YES'
		print(judge)
		ans = []
		for i in range(a):
			ans.append('0')
			ans.append('1')
		for i in range(b - a):
			ans.append('2')
			ans.append('1')
		for i in range(d):
			ans.append('2')
			ans.append('3')
		ans.append('2')
		print(' '.join(ans))
		return
	if a + c + 1 == b + d:
		judge = 'YES'
		print(judge)
		ans = []
		for i in range(d):
			ans.append('3')
			ans.append('2')
		for i in range(c - d):
			ans.append('1')
			ans.append('2')
		for i in range(a):
			ans.append('1')
			ans.append('0')
		ans.append('1')
		print(' '.join(ans))
		return
	if a + c == b + d:
		judge = 'YES'
		print(judge)
		ans = []
		for i in range(a):
			ans.append('0')
			ans.append('1')
		for i in range(b - a):
			ans.append('2')
			ans.append('1')
		for i in range(d):
			ans.append('2')
			ans.append('3')
		print(' '.join(ans))
		return
	print(judge)
main()


def main():
	(A, B, C, D) = map(int, input().split())
	N = A + B + C + D
	ans = [0] * N
	(a, b, c, d) = (A - 1, B, C, D)
	prev = 0
	ok = 1
	for i in range(1, N):
		if a < 0 or b < 0 or c < 0 or (d < 0):
			ok = 0
			break
		if prev == 0:
			b -= 1
			ans[i] = 1
			prev = 1
		elif prev == 3:
			c -= 1
			ans[i] = 2
			prev = 2
		elif prev == 1:
			if a:
				a -= 1
				ans[i] = 0
				prev = 0
			else:
				c -= 1
				ans[i] = 2
				prev = 2
		elif prev == 2:
			if b:
				b -= 1
				ans[i] = 1
				prev = 1
			else:
				d -= 1
				ans[i] = 3
				prev = 3
	if a < 0 or b < 0 or c < 0 or (d < 0):
		ok = 0
	if ok:
		print('YES')
		print(*ans)
		exit()
	ans = [0] * N
	ans[0] = 1
	(a, b, c, d) = (A, B - 1, C, D)
	prev = 1
	ok = 1
	for i in range(1, N):
		if a < 0 or b < 0 or c < 0 or (d < 0):
			ok = 0
			break
		if prev == 0:
			b -= 1
			ans[i] = 1
			prev = 1
		elif prev == 3:
			c -= 1
			ans[i] = 2
			prev = 2
		elif prev == 1:
			if a:
				a -= 1
				ans[i] = 0
				prev = 0
			else:
				c -= 1
				ans[i] = 2
				prev = 2
		elif prev == 2:
			if b:
				b -= 1
				ans[i] = 1
				prev = 1
			else:
				d -= 1
				ans[i] = 3
				prev = 3
	if a < 0 or b < 0 or c < 0 or (d < 0):
		ok = 0
	if ok:
		print('YES')
		print(*ans)
		exit()
	ans = [0] * N
	ans[0] = 2
	(a, b, c, d) = (A, B, C - 1, D)
	prev = 2
	ok = 1
	for i in range(1, N):
		if a < 0 or b < 0 or c < 0 or (d < 0):
			ok = 0
			break
		if prev == 0:
			b -= 1
			ans[i] = 1
			prev = 1
		elif prev == 3:
			c -= 1
			ans[i] = 2
			prev = 2
		elif prev == 1:
			if c:
				c -= 1
				ans[i] = 2
				prev = 2
			else:
				a -= 1
				ans[i] = 0
				prev = 0
		elif prev == 2:
			if d:
				d -= 1
				ans[i] = 3
				prev = 3
			else:
				b -= 1
				ans[i] = 1
				prev = 1
	if a < 0 or b < 0 or c < 0 or (d < 0):
		ok = 0
	if ok:
		print('YES')
		print(*ans)
		exit()
	ans = [0] * N
	ans[0] = 3
	(a, b, c, d) = (A, B, C, D - 1)
	prev = 3
	ok = 1
	for i in range(1, N):
		if a < 0 or b < 0 or c < 0 or (d < 0):
			ok = 0
			break
		if prev == 0:
			b -= 1
			ans[i] = 1
			prev = 1
		elif prev == 3:
			c -= 1
			ans[i] = 2
			prev = 2
		elif prev == 1:
			if c:
				c -= 1
				ans[i] = 2
				prev = 2
			else:
				a -= 1
				ans[i] = 0
				prev = 0
		elif prev == 2:
			if d:
				d -= 1
				ans[i] = 3
				prev = 3
			else:
				b -= 1
				ans[i] = 1
				prev = 1
	if a < 0 or b < 0 or c < 0 or (d < 0):
		ok = 0
	if ok:
		print('YES')
		print(*ans)
	else:
		print('NO')
main()