Problem:
 Score : 300 points    Problem Statement 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         Sample Input 1 2      Sample Output 1 1 2 2  4/2 = 1/1 + 1/2 + 1/2 .       Sample Input 2 3485      Sample Output 2 872 1012974 1539173474040  It is allowed to use an integer exceeding 3500 in a solution.       Sample Input 3 4664      Sample Output 3 3498 3498 3498

Solution (Python):
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()

Solution (Python):
import sys

N = int(input())

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

Solution (Python):
import sys
input = sys.stdin.buffer.readline

def main():
    N = int(input())
    if N%2 == 0:
        print(N,N,N//2)
    else:
        x,y,z = 0,0,0
        for h in range(1,3501):
            for k in range(h,3501):
                if ((4*h*k-N*(h+k))>0 and (N*h*k)%(4*h*k-N*(h+k)) == 0):
                    x = h
                    y = k
                    z = (N*h*k)//(4*h*k-N*(h+k))
                    break
            if z != 0:
                break
        print(x,y,z)

if __name__ == "__main__":
    main()

Solution (Python):
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:
            w = N*h*n // div
            if w > 0:
                print(h,n,w)
                exit()

Solution (Python):
import math

N = int(input())
for h in range(math.ceil(N/4),3500+1):
    buff = 4/N-1/h
    if buff==0:
        continue
    for n in range(math.ceil(1/buff),3500+1):
        
        if 4*h*n-N*h-n*N!=0:
            if (N*h*n)%(4*h*n-N*h-n*N) ==0:
                print(h,n,int(N*h*n/(4*h*n-N*h-n*N)))
                exit()
print("not found")

Solution (Python):
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
import itertools
from functools import *
from itertools import permutations,combinations,groupby
import sys
import bisect
import string
import math
import time
import random
def Golf():
    *a,=map(int,open(0))
def S_():
    return input()
def IS():
    return input().split()
def LS():
    return [i for i in input().split()]
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def NI(n):
    return [int(input()) for i in range(n)]
def NI_(n):
    return [int(input())-1 for i in range(n)]
def StoI():
    return [ord(i)-97 for i in input()]
def ItoS(nn):
    return chr(nn+97)
def LtoS(ls):
    return ''.join([chr(i+97) for i in ls])
def GI(V,E,Directed=False,index=0):
    org_inp=[]
    g=[[] for i in range(n)]
    for i in range(E):
        inp=LI()
        org_inp.append(inp)
        if index==0:
            inp[0]-=1
            inp[1]-=1
        if len(inp)==2:
            a,b=inp
            g[a].append(b)
            if not Directed:
                g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp
            aa=(inp[0],inp[2])
            bb=(inp[1],inp[2])
            g[a].append(bb)
            if not Directed:
                g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'

    mp=[1]*(w+2)
    found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[1]+[mp_def[j] for j in s]+[1]
    mp+=[1]*(w+2)
    return h+2,w+2,mp,found
def bit_combination(k,n=2):
    rt=[]
    for tb in range(n**k):
        s=[tb//(n**bt)%n for bt in range(k)]
        rt+=[s]
    return rt
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['YES','NO']
Yn=['Yes','No']
 
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
u_alp=string.ascii_uppercase


input=lambda: sys.stdin.readline().rstrip()
 
def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

def ran_input():
    import random
    n=random.randint(4,16)
    rmin,rmax=1,10
    a=[random.randint(rmin,rmax) for _ in range(n)]
    return n,a

show_flg=False
show_flg=True

ans=inf


n=I()

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

Solution (Python):
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

if __name__ == "__main__":
    main()

Solution (Python):
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()

Solution (Python):






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

Solution (Python):
N = int(input())
for h in range(1,3500):
    for n in range(1,3500):
        if 4*h*n-N*h-N*n != 0 and N*h*n%(4*h*n-N*h-N*n) == 0 and 0 < N*h*n//(4*h*n-N*h-N*n):
            print(h,n,N*h*n//(4*h*n-N*h-N*n))
            break
    else:
        continue
    break

Solution (Python):
N = int(input())






least = int(0.75 * N) + 2
max = 3501
for b in range(1,max):
  for a in range(1,least):
    res = 4/N - 1/a - 1/b
    if res<=0:
      continue
    candc = int(1/res)
    for c in range(candc-1,candc+2):
      if 4*a*b*c == N*(a*b + b*c + c*a):
        print(a,b,c)
        exit(0)

Solution (Python):
import sys,collections

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a=I()

  for h in range(1,3501):
    for n in range(1,3501):
      x=(4*h*n-a*n-a*h)
      if x==0:
        continue
      w=a*h*n/x
      if w>0 and w==int(w) and w<=3500:
        print(h,n,int(w))
        exit()

main()

Solution (Python):
x = int(input())

for h in range(1,4000):
    for n in range(1,4000):
        denom = 4/x - 1/h - 1/n
        if denom == 0:
            continue

        w = 1/denom
        if w < 0 or w > 50000:
            continue
        rounded = round(w)
        gosa = w - rounded
        if abs(gosa) < 10**-10:
            print(h,n,rounded)
            exit()

Solution (Python):

import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [input() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [int(input()) for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def roundUp(a, b):
        return -(-a // b)

    @staticmethod
    def toUpperMultiple(a, x):
        return Math.roundUp(a, x) * x

    @staticmethod
    def toLowerMultiple(a, x):
        return (a // x) * x

    @staticmethod
    def nearPow2(n):
        if n <= 0:
            return 0
        if n & (n - 1) == 0:
            return n
        ret = 1
        while(n > 0):
            ret <<= 1
            n >>= 1
        return ret

    @staticmethod
    def sign(n):
        if n == 0:
            return 0
        if n < 0:
            return -1
        return 1

    @staticmethod
    def isPrime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


class PriorityQueue:
    def __init__(self, l=[]):
        self.__q = l
        heapq.heapify(self.__q)
        return

    def push(self, n):
        heapq.heappush(self.__q, n)
        return

    def pop(self):
        return heapq.heappop(self.__q)


sys.setrecursionlimit(1000000)
MOD = int(1e09) + 7
INF = int(1e15)


def main():
    
    N = Scanner.int()
    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:
                w = a // b
                if w > 0:
                    print(h, n, w)
                    return
    return


if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
for h in range(1,3501):
    for n in range(1,3501):
        if 4*n*h == N*(n+h):
            continue
        w = N*h*n/(4*n*h-N*(n+h))
        if w.is_integer() == True and w>0:
            print(n,h,int(w))
            exit()

Solution (Python):
N = int(input())

for h in range((N + 3) // 4, 3501):
    for n in range((N + 3) // 4, 3501):
        a = N * h * n
        b = 4 * h * n - N * (h + n)
        if a > 0 and b > 0 and a % b == 0:
            print("{0} {1} {2}".format(h, n, a//b))
            exit()

Solution (Python):
def main():
    N = int(input())

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

if __name__ == '__main__':
    main()

Solution (Python):
import numpy as np

N = int(input())
for h in range(1, 3501):
  n = np.arange(1, 3501, dtype=np.int64)
  num = N*h*n
  den = 4*h*n - N*n - N*h
  n = n[(den>0) & (num%den == 0)]
  if len(n) > 0:
    n = n[0]
    w = N*h*n // (4*h*n - N*n - N*h)
    break
print(n, h, w)

Solution (Python):
import sys

input_methods=['clipboard','file','key']
input_method=input_methods[1]

bbn=1000000007
	


def check(n,h,j):
	
	
	t= (4*h*j-n*j-n*h)
	if t!=0 and n*h*j % t == 0:
		
		return (n*h*j)//t
	return -1
	
	

		
def main():
	n = int(input())
	
	
	
	
	
	
	for h in range(1,3501):
		for j in range(1,3501):
			w = check(n,h,j)
			if w > 0:
				
				
				return ' '.join([str(v) for v in [h,j,w]])
			continue
			
			
			
			
			if check(n,h,j,1) > 0:
				break
			if check(n,h,j,3500)<0:
				break
			if check(n,h,j,1)==0:
				return (h,j,1)
			if check(n,h,j,3500)==0:
				return (h,j,3500)
			ok=3500
			ng=0
			while ok-ng>1:
				mid = (ok+ng)//2
				cc= check(n,h,j,mid)
				if cc == 0:
					return (h,j,mid)
				elif cc < 0:
					ng=mid
				else:
					ok=mid
				
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
def main():
    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 > 0 and w.is_integer():
                return print(h, n, int(w))


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
for n in range(1, 3501):
    for w in range(n, 3501):

        try:
            t = (N*n*w) % (4*n*w - N*w - N*n)
        except:
            continue

        if t == 0 and 4*n*w - N*w - N*n>=0:
            print((N*n*w) // (4*n*w - N*w - N*n), n, w)
            exit()

Solution (Python):
n = int(input())

from fractions import Fraction

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 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))
                import sys
                sys.exit()

Solution (Python):
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()

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

main()

Solution (Python):
def main():
    N = int(input())
    for h in range(1, 3501):
        for n in range(1, 3501):
            if (4*h*n-N*h-N*n) > 0:
                if (N*h*n)%(4*h*n-N*h-N*n) == 0:
                    w = (N*h*n)//(4*h*n-N*h-N*n)
                    print(h,n,w)
                    return

main()

Solution (Python):
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()

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap



@mt
def slv(N):

    for h in range(1, 3501):
        for n in range(1, 3501):
            a = N*h*n
            b = 4*h*n - N*h - N*n
            if b != 0 and a % b == 0 and a // b > 0:
                z = a // b
                return "%d %d %d" % (h, n, z)

def main():
    N = read_int()
    print(slv(N))


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
n = 0
h = 0
w = 0

for i in range(1, 3501):
    for j in range(1, 3501):
        tmp1 = N * i * j
        tmp2 = (4 * i * j) - (N * j) - (N * i)
        if tmp2 != 0:
            s, m = divmod(tmp1, tmp2)
            if m == 0 and s >= 0:
                n, h, w = i, j, s
                print(n, h, w)
                exit()

Solution (Python):
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()

Solution (Python):
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()

Solution (Python):
import sys

if sys.platform in ['ios','win32','darwin']:
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

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

Solution (Python):
N = int(input())

con = True
for h in range(1,3500):
    for n in range(h,3500):
        memo1 = N*h*n
        memo2 = 4*h*n-N*n-N*h
        if memo2 != 0:
            memo3 = memo1/memo2
            memo4 = memo1%memo2
            if (memo4==0) and (memo3>=1):
                print(h,n,int(memo3))
                con = False
                break
    if not(con):
        break

Solution (Python):

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

Solution (Python):
N = int(input())

h, n, w = 0, 0, 0

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:
      h = i
      n = j
      w = (N * h * n) // (4 * h * n - N * (h + n))
      break
  if w != 0:
    break

print(h, n, w)

Solution (Python):
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
        else:
            w = N * h * n /(4*h*n-N*n-N*h)
            if w > 0 and w.is_integer():
                print(h, n, int(w))
                exit()

Solution (Python):
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()

Solution (Python):



N = int(input())

from itertools import product

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

Solution (Python):



N = int(input())

from itertools import product

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

Solution (Python):
N=int(input())

if N%4==0:
    print(3*N//4,3*N//4,3*N//4)
else:
    f=False
    a=(N+3)//4
    while a<=3*N//4:
        if f:
            break
        b=a
        while b<=2*N*a//(4*a-N):
            num=N*a*b
            den=4*a*b-N*(a+b)
            if den<=0:
                b+=1
                continue
            if num%den==0:
                c=num//den
                print(a,b,c)
                f=True
                break
            b+=1
        a+=1

Solution (Python):
N = int(input())

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

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

Solution (Python):
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()

Solution (Python):
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()

Solution (Python):
N = int(input())
if N % 4 == 0:
  h, n, w = (3 * N) // 4, (3 * N) // 4, (3 * N) // 4
elif N % 4 == 2:
  h, n, w = N, N, N // 2
elif N % 4 == 3:
  s = N // 4 + 1
  h, n, w = 2 * s, 2 * s, s * N
elif N % 4 == 1:
  s = (N // 4) + 1
  if s % 3 == 0:
    h = s
    n = 2 * (s // 3) * (4 * s - 3)
    w = 2 * (s // 3) * (4 * s - 3)
  elif s % 3 == 2:
    h = N
    n = 4 * (s // 3) + 2
    w = (4 * (s // 3) + 2) * (12 * (s // 3) + 5)
  elif s % 3 == 1:
    l = (N+3)//4
    p = 0
    for i in range(l, 3501):
      m = (N*i)//(4*i-N)+1
      for j in range(m, 3501):
        
        if (N*i*j) % (4*i*j-N*(i+j)) == 0 and 4*i*j-N*(i+j) > 0:
          p = 1
          h, n, w = i, j, (N*i*j) // (4*i*j-N*(i+j))
          break
      if p == 1:
        break
print(h, n, w)

Solution (Python):
n = int(input())
stop = False
for a in range(1, 3501):
    if stop:
        break
    for b in range(1, 3501):
        p = (n*a*b)
        q = 4*a*b - n*a - n*b
        if q > 0:
            r, s = divmod(p, q)
        
            if s == 0 and r > 0:
                print(a, b, r)
                stop = True
                break

Solution (Python):
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()

Solution (Python):


N=int(input())


for i in range(1,3501):
    for j in range(1,3501):
        u=-N*i*j
        d=N*i+N*j-4*i*j
        if(d!=0):
            if(u%d==0 and (u*d > 0)):
                k=u//d
                if(N*(i*j+j*k+k*i)==4*i*j*k):
                    print(i,j,k)
                    exit()

Solution (Python):
N = int(input())

h = n = w = 1
for h in range(1, 3501):
    Nh = N*h
    for n in range(1, 3501):
        div = 4*h*n - N*n - Nh
        if div <= 0:
            continue
        if (Nh*n)%div==0:
            print(h,n,(Nh*n)//div)
            exit()

Solution (Python):
N = int(input())
for h in range(3501):
    for n in range(3501):
        if 4*h*n - N*n - N*h == 0:
            continue
        w = N*h*n / (4*h*n - N*n - N*h)
        if w > 0 and int(w) == w:
            print(h, n, int(w))
            exit()

Solution (Python):
def examC():
    N = I()
    for h in range(1,3501):
        for w in range(1,3501):
            cur = 4*h*w - N*(h+w)
            if cur>0 and (N*h*w)%cur==0:
                n = (N*h*w)//cur
                print(h,n,w)
                exit()
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examC()

Solution (Python):
N = int(input())
for h in range(1,3501):
  for n in range(1,3501):
    a = 4 * h * n - N * (h + n)
    if a > 0:
      w,b = divmod(N * h * n, a)
      if b == 0:
        print(h,n,w)
        exit()

Solution (Python):
N = int(input())
for h in range(N // 4, 3501):
    for n in range(N * h // max(1, (4 * h - N)), 3501):
        mod = 4 * h * n - N * (h + n)
        if mod > 0:
            w, r = divmod(N * h * n, mod)
            if r == 0:
                print(h, n, w)
                exit()

Solution (Python):
N = int(input())
for h in range(1, 3501):
    for n in range(1, 3501):
        mod = 4 * h * n - N * (h + n)
        if mod > 0:
            w, r = divmod(N * h * n, mod)
            if r == 0:
                print(h, n, w)
                exit()

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    
    from itertools import product
    for a,b in product(range(1,3501),repeat=2):
        if(4*a*b-n*a-n*b<=0): continue
        if(n*a*b%(4*a*b-n*a-n*b)==0):
            c=n*a*b//(4*a*b-n*a-n*b)
            print(a,b,c)
            return
resolve()

Solution (Python):
from sys import stdin
N = int(stdin.readline().rstrip())
for h in range(1,3501):
    for n in range(1,3501):
        if (4*h*n-N*h-N*n) != 0:
            w = (N*h*n)/(4*h*n-N*h-N*n)
        else:
            continue
        if w.is_integer() and w > 0:
            print(h,n,int(w))
            break
    else:
        continue
    break

Solution (Python):
import sys
input = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Solution (Python):
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

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    N = int(readline())
    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 == int(w) and w != 0 and (h * n * w) != 0 and w > 0:
                    if 4 / N == (n * w + h * w + h * n) / (h * n * w):
                        print(h, n, int(w))
                        exit()


if __name__ == '__main__':
    solve()

Solution (Python):
N=int(input())

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

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

Solution (Python):


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

Solution (Python):
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()

Solution (Python):
n=int(input())
for i in range(1,3501):
    for j in range(1,3501):
        if 4*i*j-n*(i+j)<=0:
            continue
        else:
            if (n*i*j)%(4*i*j-n*(i+j))==0:
                h=i
                N=j
                w=n*i*j//(4*i*j-n*(i+j))
                break
print(h,N,w)

Solution (Python):
N = int(input())

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

Solution (Python):
n = int(input())

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

Solution (Python):
n = int(input())


def calc():
    for y in range(1, 3501):
        for z in range(1, 3501):
            up = n * y * z
            dn = 4 * y * z - n * (y + z)
            if dn <= 0:
                continue
            if up % dn == 0:
                ans = [y, z, up // dn]
                return ans


ans = calc()
print(*ans, sep=" ")

Solution (Python):
n = int(input())


def calc():
    for y in range(1, 3501):
        for z in range(1, 3501):
            up = n * y * z
            dn = 4 * y * z - n * (y + z)
            if dn <= 0:
                continue
            if up % dn == 0:
                ans = [y, z, up // dn]
                return ans


ans = calc()
print(*ans, sep=" ")

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

import numpy as np

N = int(input())

"""
4xyz = n(xy+yz+zx)
(4xy-ny-nx)z = nxy
"""

UP = 3501

for x in range(1, UP):
    y = np.arange(1, UP, dtype=np.int64)
    den = N * x * y
    num = 4*x*y - N*y - N*x
    y = y[(den % num == 0) & (num > 0)]
    if len(y) > 0:
        y = y[0]
        z = (N * x * y) // (4*x*y - N*y - N*x)
        break
print(x, y, z)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    for i in range(1,3501):
        for j in range(i,3501):
            p = i*j
            s = 4*p-n*(i+j)
            if s <= 0:
                continue
            m = n*p
            if m%s:
                continue
            k = m//s
            q = j*k
            r = k*i
            if (p+q+r)*n == 4*i*j*k:
                print(i,j,k)
                return
    return



if __name__ == "__main__":
    solve()