Tenka1 Programmer Contest - 4/N

You are given an integer N.

Find a triple of positive integers h, n and w such that 4/N = 1/h + 1/n + 1/w.

If there are multiple solutions, any of them will be accepted.

Constraints

* It is guaranteed that, for the given integer N, there exists a solution such that h,n,w \leq 3500.

Inputs

Input is given from Standard Input in the following format:


N


Outputs

Print a triple of positive integers h, n and w that satisfies the condition, in the following format:


h n w

Examples

Input

2


Output

1 2 2


Input

3485


Output

872 1012974 1539173474040


Input

4664


Output

3498 3498 3498

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
a = int(input())
for b in range(1, 3501):
	for c in range(1, 3501):
		if 4 * b * c / a - c - b == 0:
			continue
		k = b * c / (4 * b * c / a - c - b)
		if k <= 0:
			continue
		if k == int(k):
			print(b, c, int(k))
			exit()


import sys
N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		bb = 4 * h * n - N * n - N * h
		bs = N * h * n
		if bb == 0:
			continue
		if bs % bb == 0 and 1 <= bs // bb:
			print(h, n, bs // bb)
			sys.exit()


N = int(input())
for i in range(1, 3501):
	for j in range(1, 3501):
		if 4 * i * j - N * i - N * j > 0:
			if i * j * N % (4 * i * j - N * i - N * j) == 0:
				k = i * j * N // (4 * i * j - N * i - N * j)
				print(i, j, k)
				exit()


N = int(input())
if N % 2 == 0:
	print(N // 2, N, N)
else:
	for h in range(2, 3501, 2):
		for n in range(2, 3501, 2):
			if 4 * h * n - n * N - h * N != 0:
				w = h * n * N / (4 * h * n - n * N - h * N)
				if w > 0 and w.is_integer():
					print(h, n, int(w))
					exit()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		div = 4 * h * n - N * (h + n)
		if div > 0 and N * h * n % div == 0:
			print(h, n, N * h * n // div)
			exit()


N = int(input())
flag = 0
for w in range(1, 3501):
	if flag == 1:
		break
	for n in range(1, 3501):
		if 4 * w * n - N * n - N * w <= 0:
			continue
		if N * w * n % (4 * w * n - N * n - N * w) == 0:
			print(N * w * n // (4 * w * n - N * n - N * w), w, n)
			flag = 1
			break


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		if 4 * h * n != N * n + N * h:
			w = N * h * n // (4 * h * n - N * n - N * h)
			if 4 * h * n * w == N * (n * w + h * w + n * h) and w > 0:
				break
	else:
		continue
	break
print(h, n, w)


N = int(input())
flag = 0
for h in range(1, 3501):
	for n in range(h, 3501):
		if flag == 0:
			val = 4 * h * n - n * N - h * N
			if val != 0:
				w = N * h * n / val
				if int(w) == w and w > 0:
					print(h, n, int(w))
					flag = 1
		if flag == 1:
			break


n = int(input())
for i in range(1, 3501):
	for j in range(1, 3501):
		if 4 * i * j - n * i - n * j > 0 and i * j * n % (4 * i * j - n * i - n * j) == 0:
			print(i, j, i * j * n // (4 * i * j - n * i - n * j))
			exit()


N = int(input())
for a in range(1, 3501):
	for b in range(a, 3501):
		m = 4 * a * b - N * (a + b)
		if m > 0 and N * a * b % m == 0:
			c = N * a * b // m
			break
	else:
		continue
	break
print(a, b, c)


s = int(input())
for i in range(s // 4, 3501):
	for j in range(1, 3501):
		t = 4 * i * j - i * s - j * s
		y = s * i * j
		if t > 0 and s * i * j % t == 0:
			print(s * i * j // t, i, j)
			exit()


import sys

def I():
	return int(sys.stdin.readline().rstrip())
N = I()
for h in range(1, 3501):
	for n in range(h, 3501):
		if 4 * h * n - N * n - N * h > 0 and N * h * n % (4 * h * n - N * n - N * h) == 0:
			print(h, n, N * h * n // (4 * h * n - N * n - N * h))
			exit()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		x = 4 * n * h - n * N - h * N
		if x == 0:
			continue
		w = h * n * N / x
		if w <= 0:
			continue
		if N / int(w) + N / h + N / n == 4:
			print(n, h, int(w))
			exit()


N = int(input())
for i in range(1, 3501):
	for j in range(1, 3501):
		bw = 4 * i * j - N * i - N * j
		if bw <= 0:
			continue
		if N * i * j % bw == 0:
			print(i, j, N * i * j // bw)
			exit()


def solve(N):
	for h in range(1, 3501):
		for n in range(1, 3501):
			v1 = 4 * h * n - N * (h + n)
			v2 = N * h * n
			if v1 > 0 and v2 > 0 and (v2 % v1 == 0):
				return (h, n, v2 // v1)
N = int(input())
(h, n, w) = solve(N)
print(h, n, w)


from itertools import product
n = int(input())
if n % 2 == 0:
	print(n, n, n // 2)
else:
	for (h, l) in product(range(max(2, n // 4), 3501), repeat=2):
		m = n * h * l
		c = 4 * h * l - n * (h + l)
		if c > 0 and m % c == 0:
			w = m // c
			break
	print(h, l, w)


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		if 4 * n * h > N * (h + n) and N * n * h % (4 * n * h - N * (h + n)) == 0:
			w = N * n * h // (4 * n * h - N * (h + n))
			print('{} {} {}'.format(h, n, w))
			exit(0)


import sys
N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		if 4 * h * n - N * h - N * n <= 0:
			continue
		w = N * h * n / (4 * h * n - N * h - N * n)
		if not 0 < w <= 3500:
			continue
		if w == int(w):
			print(h, n, int(w))
			sys.exit()


N = int(input())
for i in range(N // 4, 3501):
	for j in range(N // 4, 3501):
		if not 4 * i * j - (i + j) * N <= 0:
			if i * j * N % (4 * i * j - (i + j) * N) == 0:
				print(i, j, i * j * N // (4 * i * j - (i + j) * N))
				exit()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		tmp = 4 * h * n - N * n - N * h
		if tmp == 0:
			continue
		else:
			w = N * h * n / tmp
		if w > 0 and w.is_integer():
			print(h, n, int(w))
			exit()


n = int(input())
for x in range(1, 3501):
	for y in range(1, 3501):
		t = 4 * x * y - n * y - n * x
		if t <= 0:
			continue
		if n * x * y % t == 0:
			print(x, y, n * x * y // t)
			exit(0)


n = int(input())
for i in range(3500):
	for j in range(3500):
		if 4 * i * j - n * (i + j) > 0 and n * i * j % (4 * i * j - n * (i + j)) == 0:
			print(i, j, n * i * j // (4 * i * j - n * (i + j)))
			exit()


N = int(input())
for h in range(1, 3500):
	for w in range(1, 3500):
		if 4 * h * w - N * h - N * w == 0:
			continue
		if N * h * w % (4 * h * w - N * h - N * w):
			continue
		x = N * h * w // (4 * h * w - N * h - N * w)
		if x > 0:
			print(h, w, x)
			exit()


import sys
N = int(input())
for h in range(3501):
	for n in range(h):
		d = 4 * h * n - N * (h + n)
		if d > 0 and N * h * n % d < 1:
			print(h, n, N * h * n // d)
			sys.exit()


def main():
	N = int(input())
	for n in range(1, 3502):
		for h in range(1, 3502):
			t = n * h * N
			p = 4 * n * h - (n * N + h * N)
			if p > 0 and t % p == 0:
				w = t // p
				print(n, h, w)
				exit()
main()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		A = 4 * h * n - N * n - N * h
		B = N * h * n
		if A > 0:
			if B % A == 0:
				print(h, n, B // A)
				break
	else:
		continue
	break


import sys
N = int(input())
for h in range(1, 3501):
	for w in range(1, 3501):
		if 4 * h * w - N * (w + h) > 0:
			if N * h * w / (4 * h * w - N * (w + h)) % 1 == 0:
				print(h, w, int(N * h * w / (4 * h * w - N * (w + h))))
				sys.exit()


import sys
n = int(input())
for i in range(1, 3501):
	for j in range(1, 3501):
		if 4 * i * j - n * i - n * j > 0:
			if n * i * j % (4 * i * j - n * i - n * j) == 0:
				print(i, j, n * i * j // (4 * i * j - n * i - n * j))
				sys.exit()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		d = 4 * h * n - N * (n + h)
		if d <= 0:
			continue
		if N * h * n % d == 0:
			print(h, n, N * h * n // d)
			exit()


n = int(input())
for i in range(1, 3501):
	for j in range(1, 3501):
		if 4 / n - 1 / i - 1 / j == 0:
			continue
		if abs(1 / (4 / n - 1 / i - 1 / j) - int(1 / (4 / n - 1 / i - 1 / j))) < 10 ** (-12):
			if 10 ** 7 > 1 / (4 / n - 1 / i - 1 / j) > 0:
				print(i, j, int(1 / (4 / n - 1 / i - 1 / j)))
				exit()


def main():
	N = int(input())
	for h in range(1, 3501):
		for n in range(h, 3501):
			a = 4 * h * n - N * (h + n)
			b = N * h * n
			if a > 0 and b % a == 0:
				print(h, n, b // a)
				return
main()


N = int(input())
solved = False
for h in range(1, 3501):
	for n in range(1, 3501):
		if 4 * h * n - N * (h + n) > 0 and N * h * n % (4 * h * n - N * (h + n)) == 0:
			print(h, n, N * h * n // (4 * h * n - N * (h + n)))
			solved = True
			break
	if solved:
		break


N = int(input())
if N % 2 == 0:
	print(N // 2, N, N)
else:
	for i in range(1, 3501):
		for j in range(1, 3501):
			if 4 * i * j - N * i - N * j != 0:
				w = N * i * j / (4 * i * j - N * i - N * j)
				if w > 0 and w.is_integer():
					print(i, j, int(w))
					exit()


N = int(input())
for h in range(1, 3501):
	for n in range(h, 3501):
		top = N * h * n
		bottom = 4 * h * n - N * n - N * h
		if bottom > 0 and top % bottom == 0:
			print(h, n, top // bottom)
			exit()


N = int(input())
for n in range(1, 3501):
	for h in range(1, 3501):
		a = N * n * h
		b = 4 * n * h - N * (n + h)
		if b > 0 and a % b == 0:
			print(n, h, a // b)
			exit()


n = int(input())
if n % 2 == 0:
	print(n, n, n // 2)
else:
	for h in range(max(2, n // 4), 3501):
		for l in range(max(2, n // 4), 3501):
			m = n * h * l
			c = 4 * h * l - n * (h + l)
			if c > 0 and m % c == 0:
				w = m // c
				print(h, l, w)
				exit()


N = int(input())
for h in range(3500):
	for n in range(h):
		try:
			w = N * h * n / (4 * n * h - N * n - N * h)
		except ZeroDivisionError:
			continue
		if w > 0 and w.is_integer():
			print(h, n, int(w))
			exit()


import sys
readline = sys.stdin.readline
N = int(readline())
for i in range(1, 3501):
	for j in range(1, 3501):
		if 4 * i * j - N * i - N * j > 0 and N * i * j % (4 * i * j - N * i - N * j) == 0:
			print(i, j, N * i * j // (4 * i * j - N * i - N * j))
			exit()


N = int(input())
s = 1
for i in range(1, 3501):
	if s == 0:
		break
	for j in range(1, 3501):
		if 4 * i * j - N * (i + j) > 0 and N * i * j % (4 * i * j - N * (i + j)) == 0:
			print(i, j, N * i * j // (4 * i * j - N * (i + j)))
			s = 0
			break


n = int(input())
for i in range(1, 3501):
	for j in range(1, 3500):
		if 4 * i * j - n * i - n * j > 0:
			w = n * i * j / (4 * i * j - n * i - n * j)
			if w.is_integer():
				print(str(i) + ' ' + str(j) + ' ' + str(int(w)))
				exit()


n = int(input())
for a in range(1, 3501):
	for b in range(1, 3501):
		if 4 * a * b - n * b - a * n != 0:
			c = n * a * b / (4 * a * b - n * b - a * n)
			if c >= 1 and c.is_integer():
				print(a, b, int(c))
				exit()


N = int(input())
for h in range(int(N / 4), 3501):
	for n in range(h, 3501):
		a = 4 * h * n - N * (n + h)
		if a != 0:
			w = N * h * n / a
			if w == int(w) and 0 < w < 1000000000000:
				print(h, n, int(w), sep=' ')
				exit(0)


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		if 4 * h * n - N * n - N * h > 0:
			w = N * h * n / (4 * h * n - N * n - N * h)
			if w.is_integer():
				print(h, n, int(w))
				exit()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		try:
			tmp = n * h * N / (4 * h * n - N * n - N * h)
		except:
			continue
		if tmp == tmp // 1 and tmp > 0:
			print(h, n, int(tmp))
			exit()


import sys
N = int(input())
for h in range(1, 3501):
	Nh = N * h
	for n in range(1, 3501):
		Nn = N * n
		left = 4 * h * n - Nn - Nh
		Nhn = N * n * h
		if left > 0 and Nhn % left == 0:
			print(h, n, Nhn // left)
			sys.exit()


n = int(input())
for i in range(1, 3501):
	for j in range(i, 3501):
		if 4 * i * j - n * i - n * j > 0 and n * i * j % (4 * i * j - n * i - n * j) == 0:
			w = n * i * j // (4 * i * j - n * i - n * j)
			print(i, j, w)
			quit()
		else:
			continue


n = int(input())
for i in range(1, 3501):
	for j in range(1, 3501):
		t1 = n * i * j
		t2 = 4 * i * j - n * i - n * j
		if t2 > 0:
			(k, m) = divmod(t1, t2)
			if k > 0 and m == 0:
				print(i, j, k)
				exit()


N = int(input())
for ai in range(1, 3500):
	for bi in range(1, 3500):
		try:
			ci = N * ai * bi / (4 * ai * bi - N * ai - N * bi)
		except:
			continue
		if ci == int(ci) and ci > 0:
			print(ai, bi, int(ci))
			exit()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		y = 4 * h * n - N * (h + n)
		if 0 < y:
			x = N * h * n
			(w, mod) = divmod(x, y)
			if mod == 0:
				print(h, n, w)
				exit()


N = int(input())
for h in range(1, 3501):
	if 4 * h <= N:
		continue
	for w in range(h, 3501):
		if 4 * h * w > (h + w) * N and N * h * w % (4 * h * w - (h + w) * N) == 0:
			print(h, w, N * h * w // (4 * h * w - (h + w) * N))
			exit()


n = int(input())
for i in range(max(1, n // 4), 3501):
	for j in range(max(1, n // 4 + 1), 3501):
		if 4 * i * j - i * n - j * n != 0:
			num1 = i * j * n / (4 * i * j - i * n - j * n)
			num2 = i * j * n // (4 * i * j - i * n - j * n)
			if num1 == num2 and num1 > 0:
				print(i, j, num2)
				exit()


n = int(input())
for h in range(1, 3501):
	for w in range(1, 3501):
		bns = n * h * w
		bnb = 4 * h * w - n * (h + w)
		if bnb >= 1 and bns % bnb == 0:
			print(h, w, bns // bnb)
			exit()


N = int(input())
max_int = 3500
for n in range(1, max_int + 1):
	for w in range(1, max_int + 1):
		a1 = N * n * w
		a2 = 4 * n * w - w * N - N * n
		if a2 <= 0:
			continue
		if a1 % a2 == 0 and a1 // a2 <= max_int:
			print(N * n * w // (4 * n * w - w * N - N * n), n, w)
			exit()


n = int(input())
for x in range(n // 4, 3501):
	for y in range(x, 3501):
		A = n * x * y
		B = 4 * x * y - n * x - n * y
		if B > 0 and A % B == 0:
			print(x, y, A // B)
			exit()


import sys
N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		if 4 * h * n - N * n - N * h == 0:
			continue
		w = N * h * n / (4 * h * n - N * n - N * h)
		if w.is_integer() and w > 0:
			print(h, n, int(w))
			sys.exit(0)


N = int(input())
for i in range(1, 3501):
	for j in range(1, 3501):
		(a, b) = (N * i * j, 4 * i * j - (i + j) * N)
		if b > 0 and a % b == 0:
			print(i, j, a // b)
			exit()


n = int(input())
for i in range(1, 3501):
	for j in range(1, 3501):
		seed = 4 * i * j - n * (i + j)
		if seed > 0:
			(k, mod) = divmod(n * i * j, seed)
			if mod == 0:
				print(i, j, k)
				exit()


N = int(input())
for i in range(1, 3501):
	h = i
	for j in range(1, 3501):
		n = j
		wb = 4 * h * n - N * n - N * h
		if wb > 0:
			w = N * h * n / wb
			if w.is_integer() is True:
				print(h, n, int(w))
				exit()


import sys
n = int(input())
for a in range(1, 3501):
	for b in range(1, 3501):
		if 4 * a * b - n * b - n * a > 0:
			c = n * a * b / (4 * a * b - n * b - n * a)
			if c.is_integer():
				print('%d %d %d' % (a, b, c))
				sys.exit()


import sys
N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		if 4 * h * n - N * n - N * h != 0:
			(w, r) = divmod(N * h * n, 4 * h * n - N * n - N * h)
			if r == 0 and w > 0:
				print(h, n, w)
				sys.exit()


s = int(input())
for n in range(1, 3501):
	for h in range(1, 3501):
		x = 4 * h * n - s * n - s * h
		if x > 0:
			if (s * h * n / x).is_integer():
				print(int(s * h * n / x), h, n)
				exit()


n = int(input())
for h in range(1, 3 * n // 4 + 1):
	for j in range(1, 3501):
		if 4 * h * j - j * n - n * h > 0 and 3500 >= n * h * j / (4 * h * j - j * n - n * h) > 0 and (n * h * j / (4 * h * j - j * n - n * h)).is_integer():
			print(h, j, n * h * j // (4 * h * j - j * n - n * h))
			exit()


N = int(input())
for h in range(1, 3500):
	for n in range(1, 3500):
		if 4 * h * n - N * n - N * h > 0 and N * h * n % (4 * h * n - N * n - N * h) == 0:
			print(h, n, N * h * n // (4 * h * n - N * n - N * h))
			exit()


M = 3501
N = int(input())
for h in range(1, M):
	for w in range(1, M):
		u = 4 * h * w - N * w - N * h
		d = N * h * w
		if u <= 0:
			continue
		if d % u == 0:
			print(h, w, d // u)
			exit()


def main():
	n = int(input())
	for i in range(1, 3501):
		for j in range(1, 3501):
			if 4 * i * j - n * i - n * j > 0 and n * i * j % (4 * i * j - n * i - n * j) == 0:
				print(i, j, n * i * j // (4 * i * j - n * i - n * j))
				return
main()


n = int(input())
flag = True
for a in range(1, 3501):
	for b in range(1, 3501):
		if 4 * a * b - n * (a + b) > 0 and n * a * b % (4 * a * b - n * (a + b)) == 0:
			print(a, b, n * a * b // (4 * a * b - n * (a + b)))
			exit()


n = int(input())
a = n * 3 // 4 + 3
for i in range(max(n // 4, 1), a):
	for j in range(a - 3, 3501):
		k = 4 * i * j - n * (i + j)
		if k == 0:
			continue
		(x, y) = divmod(n * i * j, 4 * i * j - n * (i + j))
		if y == 0 and x > 0:
			print(i, j, x)
			exit()


N = int(input())
for i in range(1, 3501):
	for j in range(i, 3501):
		if 4 * i * j - N * (i + j) > 0 and N * i * j % (4 * i * j - N * (i + j)) == 0:
			k = N * i * j // (4 * i * j - N * (i + j))
			print(i, j, k)
			break
	else:
		continue
	break


N = int(input())
f = True
for h in range(1, 3501):
	for n in range(1, 3501):
		w_ = -(h + n) / (h * n) + 4 / N
		if w_ > 0:
			w = 1 / w_
			if w % 1 < 1e-07:
				print(h, n, int(w))
				f = False
				break
	if not f:
		break


import sys
N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		tmp = 4 * h * n - N * (n + h)
		if tmp == 0:
			continue
		(d, m) = divmod(N * h * n, tmp)
		if m == 0 and d > 0:
			print(h, n, d)
			sys.exit()


N = int(input())
for n in range(1, 3501):
	for h in range(1, 3501):
		(up, down) = (N * n * h, 4 * h * n - N * (h + n))
		if down != 0:
			if up % down == 0 and up // down > 0:
				print(h, n, N * n * h // (4 * n * h - N * (h + n)))
				exit()


N = int(input())
for i in range(1, 3500):
	for j in range(1, 3500):
		a = N * i * j
		b = 4 * i * j - N * j - N * i
		if b > 0:
			if (a / b).is_integer() == True:
				print(i, j, int(a / b))
				exit()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		val = 4 * n * h - N * n - N * h
		if val > 0:
			if N * n * h % val == 0:
				print(h, n, N * n * h // val)
				exit()


import sys
N = int(input())
if N % 2 == 0:
	print(N // 2, N, N)
	sys.exit()
for a in range(1, 3501):
	for b in range(1, a):
		M = N * a * b
		L = 4 * a * b - N * (a + b)
		if L > 0:
			if M % L == 0:
				print(a, b, M // L)
				sys.exit()


N = int(input())

def check():
	for h in range(1, 3500):
		for n in range(1, 3500):
			div = 4 * n * h - N * h - N * n
			if div > 0 and N * h * n % div == 0:
				print(h, n, N * h * n // div)
				return 0
check()


N = int(input())
if N % 2 == 0:
	print(N, N, N // 2)
else:
	for h in range(1, 3501):
		for n in range(1, 3501):
			num = N * h * n
			dem = 4 * h * n - N * (h + n)
			if dem > 0 and num % dem == 0:
				print(h, n, num // dem)
				quit()


import sys
N = int(input())
for i in range(1, 3501):
	for j in range(max(i - 1, 1), 3501):
		if 4 * i * j - N * i - N * j != 0:
			w = N * i * j / (4 * i * j - N * i - N * j)
			if w > 0 and w.is_integer():
				print(i, j, int(w))
				sys.exit()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		v = 4 * h * n - N * n - N * h
		if v == 0:
			continue
		w = N * h * n / v
		if w.is_integer() and w > 0:
			print(h, n, int(w))
			quit()


import math
N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		(x, y) = (N * h * n, 4 * h * n - n * N - h * N)
		if y == 0:
			continue
		w = x / y
		if w > 0 and math.floor(w) == math.ceil(w):
			print(h, n, math.floor(w))
			exit()


n = int(input())
for x in range(1, 3501):
	for y in range(1, 3501):
		if 4 * x * y - n * y - n * x > 0 and n * x * y % (4 * x * y - n * y - n * x) == 0:
			z = n * x * y // (4 * x * y - n * y - n * x)
			print(x, y, z)
			exit()


N = int(input())
ans = next(([x, y, N * x * y // (4 * x * y - N * (x + y))] for x in range(1, 3501) for y in range(1, 3501) if 4 * x * y > N * (x + y) and N * x * y % (4 * x * y - N * (x + y)) == 0))
print(*ans)


n = int(input())
for i in range(1, 3501):
	for j in range(i, 3501):
		top = n * i * j
		bot = 4 * i * j - n * (i + j)
		if bot > 0 and top % bot == 0:
			w = top // bot
			if w > 0:
				print(i, j, w)
				exit()


n = int(input())
for a in range(1, 3501):
	for b in range(1, 3501):
		if 4 * a * b - n * a - n * b == 0:
			continue
		if 1 <= n * a * b // (4 * a * b - n * (a + b)) <= 3500 and n * a * b % (4 * a * b - n * a - n * b) == 0:
			print(a, b, n * a * b // (4 * a * b - n * (a + b)))
			exit()


N = int(input())
for h in range(1, 3500):
	for n in range(1, 3500):
		if 4 * h * n - N * h - N * n == 0:
			continue
		w = N * h * n / (4 * h * n - N * h - N * n)
		if w.is_integer() and 1 <= w <= 3500:
			print(h, n, int(w))
			exit()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3501):
		a = n * h * N
		b = 4 * h * n - N * n - N * h
		if b > 0 and a % b == 0:
			print(h, n, a // b)
			quit()
assert False


N = int(input())

def Calc(N):
	for h in range(1, 3501):
		for n in range(h, 3501):
			A = 4 * h * n - N * (h + n)
			B = N * h * n
			if A <= 0 or B <= 0:
				continue
			if B % A == 0:
				print(h, n, B // A)
				return
Calc(N)


N = int(input())
for h in range(N // 4 + 1, min(3501, 3 * N // 4 + 1)):
	for n in range(N * h // (4 * h - N), min(3501, 2 * N * h // (4 * h - N) + 1)):
		x = 4 * h * n - N * n - N * h
		y = N * h * n
		if x > 0 and (not y % x):
			print('{} {} {}'.format(h, n, y // x))
			exit()


N = int(input())
MAX = 3501
for i in range(1, MAX):
	for j in range(1, MAX):
		chi = N * i * j
		mom = 4 * i * j - N * i - N * j
		if mom <= 0:
			continue
		if chi % mom == 0:
			ans = [i, j, chi // mom]
			print(*ans)
			exit()


N = int(input())
for h in range(2, 3501, 2):
	for n in range(2, 3501, 2):
		if 4 * h * n - N * n - N * h != 0 and N * h * n % (4 * h * n - N * n - N * h) == 0:
			if 0 < N * h * n // (4 * h * n - N * n - N * h):
				print(h, n, N * h * n // (4 * h * n - N * n - N * h))
				exit()


N = int(input())
for h in range(1, 3501):
	for n in range(1, 3500):
		u = N * h * n
		s = 4 * h * n - N * n - N * h
		if s == 0:
			continue
		if u % s == 0:
			if u // s > 0:
				print(h, n, u // s)
				exit()