As you very well know, the whole Universe traditionally uses three-dimensional Cartesian system of coordinates. In this system each point corresponds to three real coordinates (x, y, z). In this coordinate system, the distance between the center of the Universe and the point is calculated by the following formula: <image>. Mushroom scientists that work for the Great Mushroom King think that the Universe isn't exactly right and the distance from the center of the Universe to a point equals xa·yb·zc.

To test the metric of mushroom scientists, the usual scientists offered them a task: find such x, y, z (0 ≤ x, y, z; x + y + z ≤ S), that the distance between the center of the Universe and the point (x, y, z) is maximum possible in the metric of mushroom scientists. The mushroom scientists aren't good at maths, so they commissioned you to do the task.

Note that in this problem, it is considered that 00 = 1.

Input

The first line contains a single integer S (1 ≤ S ≤ 103) — the maximum sum of coordinates of the sought point.

The second line contains three space-separated integers a, b, c (0 ≤ a, b, c ≤ 103) — the numbers that describe the metric of mushroom scientists.

Output

Print three real numbers — the coordinates of the point that reaches maximum value in the metrics of mushroom scientists. If there are multiple answers, print any of them that meets the limitations.

A natural logarithm of distance from the center of the Universe to the given point in the metric of mushroom scientists shouldn't differ from the natural logarithm of the maximum distance by more than 10 - 6. We think that ln(0) = - ∞.

Examples

Input

3
1 1 1


Output

1.0 1.0 1.0


Input

3
2 0 0


Output

3.0 0.0 0.0

Difficulty: MEDIUM_HARD
Tags: Sorting

Mathematics
Skill types: Sorting

Starter code:

Solutions:
a = int(input())
b = list(map(int, input().split()))
if sum(b) == 0:
	print(' '.join([str(a / 3)] * 3))
else:
	print(' '.join(map(str, map(lambda x: a * x / sum(b), b))))


n = int(input())
(a, b, c) = map(int, input().split())
s = a + b + c
if s == 0:
	print(0, 0, 0)
else:
	print(n * a / s, n * b / s, n * c / s)


S = int(input())
v = [int(x) for x in input().strip().split()]
zeroes = v.count(0)
total = sum(v)
ans = []
if zeroes == 0:
	ans = [S * v[i] / total for i in range(3)]
elif zeroes == 1:
	for i in range(3):
		if v[i] == 0:
			total -= v[i]
	for i in range(3):
		if v[i] != 0:
			ans.append(S * v[i] / total)
		else:
			ans.append(0)
else:
	for i in range(3):
		if v[i] == 0:
			ans.append(0)
		else:
			ans.append(S)
print(*ans)


def count(x1, y1, z1, x2, y2, z2):
	if x2 == 0 and a != 0 or (y2 == 0 and b != 0) or (z2 == 0 and c != 0):
		return False
	if x2 == 0:
		x2 = 1
	if y2 == 0:
		y2 = 1
	if z2 == 0:
		z2 = 1
	return (x1 / x2) ** a * (y1 / y2) ** b * (z1 / z2) ** c < 1
n = int(input())
(a, b, c) = map(int, input().split())
(l1, r1) = (0, n)
for i in range(200):
	x1 = l1 + (r1 - l1) / 3
	(l2, r2) = (0, n - x1)
	for j in range(200):
		y1 = l2 + (r2 - l2) / 3
		y2 = r2 - (r2 - l2) / 3
		if count(x1, y1, n - x1 - y1, x1, y2, n - x1 - y2):
			l2 = y1
		else:
			r2 = y2
	y11 = l2
	x2 = r1 - (r1 - l1) / 3
	(l2, r2) = (0, n - x2)
	for j in range(200):
		y1 = l2 + (r2 - l2) / 3
		y2 = r2 - (r2 - l2) / 3
		if count(x2, y1, n - x2 - y1, x2, y2, n - x2 - y2):
			l2 = y1
		else:
			r2 = y2
	y22 = l2
	if count(x1, y11, n - x1 - y11, x2, y22, n - x2 - y22):
		l1 = x1
		p = y11
	else:
		r1 = x2
		p = y22
print(l1, p, n - l1 - p)


s = float(input())
(a, b, c) = map(float, input().split())
if a == b and b == c and (c == 0):
	print('0 0 ')
	print(s)
else:
	print(a * s / (a + b + c), end=' ')
	print(b * s / (a + b + c), end=' ')
	print(c * s / (a + b + c), end=' ')


def gribnye(s, a, b, c):
	if a == b == c == s == 0:
		return [0.0]
	elif a == b == c == 0 and s != 0:
		return (0, 0, 0)
	a1 = a * s / (a + b + c)
	b1 = b * s / (a + b + c)
	c1 = c * s / (a + b + c)
	return (a1, b1, c1)
S = int(input())
(A, B, C) = [int(i) for i in input().split()]
print(*gribnye(S, A, B, C))


sa = int(input())
(a, b, c) = map(int, input().split(' '))
if a == 0 and b == 0 and (c == 0):
	print(0, 0, 0)
else:
	x = a * sa / (a + b + c)
	y = b * sa / (a + b + c)
	z = c * sa / (a + b + c)
	print(x, y, z)


S = int(input())
v = [int(x) for x in input().strip().split()]
print(*([S * v[i] / sum(v) for i in range(3)] if sum(v) != 0 else '000'))


from sys import stdin, stdout
s = int(stdin.readline())
(a, b, c) = map(int, stdin.readline().split())
E = 10 ** (-7)
(x, y, z) = (s / 3, s / 3, s / 3)
ans = 1

def power(v, n):
	cnt = 1
	while n:
		if n % 2:
			cnt *= v
		n >>= 1
		v *= v
	return cnt

def count(f, s, t):
	return power(f / x, int(a)) * power(s / y, int(b)) * power(t / z, int(c))

def third(S, f, s):
	global x, y, z
	(l, r) = (0, S)
	(lb, rb) = (l + (r - l) / 3, r - (r - l) / 3)
	while r - l > E:
		if count(f, s, lb) > count(f, s, rb):
			r = rb
		else:
			l = lb
		(lb, rb) = (l + (r - l) / 3, r - (r - l) / 3)
	if count(f, s, (lb + rb) / 2) > ans:
		(x, y, z) = (f, s, (lb + rb) / 2)
	return count(f, s, (lb + rb) / 2)

def second(S, f):
	(l, r) = (0, S)
	(lb, rb) = (l + (r - l) / 3, r - (r - l) / 3)
	while r - l > E:
		if third(S - lb, f, lb) > third(S - rb, f, rb):
			r = rb
		else:
			l = lb
		(lb, rb) = (l + (r - l) / 3, r - (r - l) / 3)
	return third(S - (lb + rb) / 2, f, (lb + rb) / 2)

def first(S):
	(l, r) = (0, s)
	(lb, rb) = (l + (r - l) / 3, r - (r - l) / 3)
	while r - l > E:
		if second(S - lb, lb) > second(S - rb, rb):
			r = rb
		else:
			l = lb
		(lb, rb) = (l + (r - l) / 3, r - (r - l) / 3)
	return (S - (rb + lb) / 2, (rb + lb) / 2)
first(s)
stdout.write(str(x) + ' ' + str(y) + ' ' + str(z))