n = int(input()) a, b = map(int, input().split()) d = [*map(int, input().split())] s = sum(d) if s % 2 != (a + b) % 2 or s < a + b: print('NO') else: x = (s - a - b) // 2 c = 0 for i in d: c += i if c >= x and s - c >= x: print('YES') l, r = c - x, c + x print(0, 0) p = 0 for i in d: p += i if l <= p <= r: if l <= a: print(l, -min(p - l, r - p)) else: print(a + min(p - l, r - p), l - a) else: z = p if p > r: z -= 2 * x if z <= a: print(z, 0) else: print(a, z - a) break else: print('NO')