The start of the new academic year brought about the problem of accommodation students into dormitories. One of such dormitories has a a × b square meter wonder room. The caretaker wants to accommodate exactly n students there. But the law says that there must be at least 6 square meters per student in a room (that is, the room for n students must have the area of at least 6n square meters). The caretaker can enlarge any (possibly both) side of the room by an arbitrary positive integer of meters. Help him change the room so as all n students could live in it and the total area of the room was as small as possible.


-----Input-----

The first line contains three space-separated integers n, a and b (1 ≤ n, a, b ≤ 10^9) — the number of students and the sizes of the room.


-----Output-----

Print three integers s, a_1 and b_1 (a ≤ a_1; b ≤ b_1) — the final area of the room and its sizes. If there are multiple optimal solutions, print any of them.


-----Examples-----
Input
3 3 5

Output
18
3 6

Input
2 4 4

Output
16
4 4

Difficulty: HARD
Tags: Mathematics

Complete search
Skill types: Complete search

Starter code:

Solutions:
from math import ceil
(n, a, b) = list(map(int, input().split()))
s = 6 * n
if a * b >= s:
	(x, y) = (a, b)
else:
	(a1, b1) = (min(a, b), max(a, b))
	q = [(x, ceil(s / x)) for x in range(a1, ceil(s ** 0.5)) if ceil(s / x) > b1]
	(x, y) = min(q, key=lambda c: c[0] * c[1])
	if x < a:
		(x, y) = (y, x)
print(x * y)
print(x, y)


from math import sqrt
(n, a, b) = map(int, input().split())
(p, x, y) = (a * b, a, b)
n *= 6
if n > p:
	i = min(x, y)
	j = min(n // max(x, y), int(sqrt(n))) + 1
	p = n * (a + b)
	for e in range(i, j):
		k = (n + e - 1) // e
		if e * k < p:
			p = e * k
			x = e
			y = k
			if p == n:
				break
if a > b and x < y or (a < b and x > y):
	(x, y) = (y, x)
print(p)
print(x, y)


def solve(n, a, b):
	need = n * 6
	(orig_a, orig_b) = (a, b)
	if a < b:
		(a, b) = (b, a)
	y = b
	best_prod = None
	best = (None, None)
	while True:
		(x, modulo) = divmod(need, y)
		if modulo:
			x += 1
		if x < a:
			x = a
		prod = x * y
		if not best_prod or best_prod > prod:
			best_prod = prod
			best = (x, y)
		if best_prod == need:
			break
		y += 1
		if x < y:
			break
		if x < a or y < b:
			break
	(x, y) = best
	if x < orig_a or y < orig_b:
		best = (y, x)
	return best

def __starting_point():
	(n, a, b) = list(map(int, input().split()))
	(x, y) = solve(n, a, b)
	print(x * y)
	print(x, y)
__starting_point()


from math import *
from itertools import *
(n, a, b) = map(int, input().split())
if a * b >= 6 * n:
	print(a * b)
	print(a, b)
else:
	p = ceil(sqrt(6 * n))
	(s, a1, b1) = min(chain(((x * ceil(6 * n / x), x, ceil(6 * n / x)) for x in range(a, p + 1) if ceil(6 * n / x) >= b), ((ceil(6 * n / y) * y, ceil(6 * n / y), y) for y in range(b, p + 1) if ceil(6 * n / y) >= a)))
	print(s)
	print(a1, b1)


from math import *
(s, a, b) = map(int, input().split())
n = 6 * s
if n <= a * b:
	print(a * b)
	print(a, b)
else:
	while True:
		x = min(a, b)
		val = sqrt(n)
		while n % x != 0 and x <= val:
			x += 1
		if n // x >= max(a, b) and n % x == 0:
			print(n)
			if a < b:
				print(x, n // x)
			else:
				print(n // x, x)
			break
		n += 1


import math
(n, a, b) = map(int, input().strip().split())
min_sq = n * 6
if a * b >= min_sq:
	print('{}\n{} {}'.format(a * b, a, b))
else:
	max_sq = math.inf
	swap = False
	if a > b:
		(a, b) = (b, a)
		swap = True
	(a_n, b_n) = (a, b)
	for i in range(a, int(math.ceil(math.sqrt(min_sq))) + 1):
		n_b = int(math.ceil(min_sq / i))
		if n_b < b:
			continue
		new_sq = n_b * i
		if new_sq < max_sq:
			max_sq = new_sq
			a_n = i
			b_n = n_b
	if swap:
		(a_n, b_n) = (b_n, a_n)
	print('{}\n{} {}'.format(max_sq, a_n, b_n))


from math import sqrt
from math import ceil
(n, a, b) = map(int, input().split(' '))
batas = ceil(sqrt(6 * n))
luas = 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 100
(p, l) = (0, 0)
if a * b >= 6 * n:
	print(a * b)
	print('%d %d' % (a, b))
	exit(0)
for i in range(a, max(a, batas + 1)):
	lenmin = ceil(float(6 * n) / i)
	if lenmin < b:
		continue
	if lenmin * i == 6 * n:
		print('%d\n%d %d' % (6 * n, i, lenmin))
		exit(0)
	if lenmin * i > 6 * n:
		if lenmin * i < luas:
			p = i
			l = lenmin
			luas = lenmin * i
for i in range(b, max(b, batas + 1)):
	lenmin = ceil(float(6 * n) / i)
	if lenmin < a:
		continue
	if lenmin * i == 6 * n:
		print('%d\n%d %d' % (6 * n, lenmin, i))
		exit(0)
	if lenmin * i > 6 * n:
		if lenmin * i < luas:
			p = lenmin
			l = i
			luas = lenmin * i
print('%d\n%d %d' % (p * l, p, l))


import math
(n, a, b) = [int(x) for x in input().split()]
area_required = 6 * n
if a * b >= area_required:
	print(str(a * b))
	print(str(a) + ' ' + str(b))
else:
	final_area = 2 * area_required
	if a > b:
		switch = 1
		temp = a
		a = b
		b = temp
	else:
		switch = 0
	new_a = a
	new_b = b
	for t_a in range(a, b + 1):
		t_b = max(math.ceil(area_required / t_a), b)
		temp_area = t_a * t_b
		if temp_area < final_area:
			final_area = temp_area
			new_a = t_a
			new_b = t_b
		if final_area == area_required:
			break
	for t_a in range(b, int(math.sqrt(area_required)) + 2):
		t_b = max(math.ceil(area_required / t_a), b)
		temp_area = t_a * t_b
		if temp_area < final_area:
			final_area = temp_area
			new_a = t_a
			new_b = t_b
		if final_area == area_required:
			break
	print(str(final_area))
	if switch == 0:
		print(str(new_a) + ' ' + str(new_b))
	else:
		print(str(new_b) + ' ' + str(new_a))


import sys
import math

def calc():
	global ans, a, b
(n, a, b) = map(int, input().strip().split(' '))
n *= 6
if a * b >= n:
	print('%i %i %i' % (a * b, a, b))
	sys.exit(0)
m = int(math.sqrt(n)) + 10
ans = (10 ** 15, 0, 0)
for i in range(m):
	k = max(b, n // (a + i))
	if k * (a + i) < n:
		tmp = ((k + 1) * (a + i), a + i, k + 1)
	else:
		tmp = ((k + 0) * (a + i), a + i, k)
	if tmp < ans:
		ans = tmp
for i in range(m):
	k = max(a, n // (b + i))
	if k * (b + i) < n:
		tmp = ((k + 1) * (b + i), k + 1, b + i)
	else:
		tmp = ((k + 0) * (b + i), k, b + i)
	if tmp < ans:
		ans = tmp
print('%i %i %i' % ans)


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(100000000)
	threading.stack_size(40960000)
	thread = threading.Thread(target=main)
	thread.start()
from math import ceil, floor, log, sqrt, factorial
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
inf = float('inf')
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[1]

def sort2(l):
	return sorted(l, key=getKey, reverse=True)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

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

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

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

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 read():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def main():
	(n, a, b) = mi()
	if a * b >= 6 * n:
		print(a * b)
		print(a, b)
	else:
		f = 0
		if a > b:
			f = 1
			(a, b) = (min(a, b), max(a, b))
		ans = inf
		a1 = 0
		a2 = 0
		for i in range(a, int(sqrt(6 * n)) + 1):
			x = ceil(6 * n / i)
			if x < b:
				continue
			if x * i < ans:
				ans = x * i
				a1 = i
				a2 = x
		if f == 1:
			(a1, a2) = (a2, a1)
		print(ans)
		print(a1, a2)
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))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(n, a, b) = map(int, input().split(' '))
A = 6 * n
if a * b >= 6 * n:
	print(a * b)
	print(a, b)
else:
	R = []
	temp = float('INF')
	for i in range(1, int(A ** 0.5) + 2):
		j = A // i
		if i * j < A:
			j += 1
		x = max([a, b, i, j])
		y = max(min(a, b), min(i, j))
		if temp > x * y:
			temp = x * y
			if b > a:
				(x, y) = (y, x)
			R = [x, y, temp]
	print(R[2])
	print(R[0], R[1])


from math import *
(n, a, b) = map(int, input().split())
ans = (10000005700000, 1000000000064000)
ansp = 10 ** 55
if a * b >= 6 * n:
	ans = (a, b)
	ansp = a * b
for x in range(int(sqrt(6 * n) * 1.33)):
	yy = max(0, ceil((6 * n - a * b - b * x) / (a + x)) - 1)
	for y in range(yy, yy + 3):
		if 6 * n <= (a + x) * (b + y) < ansp:
			ansp = (a + x) * (b + y)
			ans = (a + x, b + y)
(a, b) = (b, a)
for x in range(int(sqrt(6 * n) * 1.44)):
	yy = max(0, ceil((6 * n - a * b - b * x) / (a + x)) - 1)
	for y in range(yy, yy + 3):
		if 6 * n <= (a + x) * (b + y) < ansp:
			ansp = (a + x) * (b + y)
			ans = (b + y, a + x)
print(ansp)
print(*ans)


(a, b, c) = map(int, input().split(' '))

def solve(a, b, c):
	if b >= c:
		(b, c) = (c, b)
	for i in range(max(6 * a, b * c), 10 ** 50):
		for j in range(b, int(i ** 0.5) + 1):
			if i % j == 0:
				if int(i / j) >= c:
					return (i, j, int(i / j))
(x, y, z) = solve(a, b, c)
print(x)
if y >= b and z >= c:
	print(y, z)
else:
	print(z, y)


(n, a, b) = map(int, input().split())
if a * b > 6 * n:
	print(a * b)
	print(str(a) + ' ' + str(b))
	exit()
rev = False
if a > b:
	rev = True
	tmp = a
	a = b
	b = tmp
size = 6 * n
while True:
	flag = False
	small = 0
	i = a
	while i * i < size:
		if size % i == 0 and size / i >= b:
			flag = True
			small = i
			break
		i += 1
	if flag:
		if rev:
			print(size)
			print(str(size // small) + ' ' + str(small))
		else:
			print(size)
			print(str(small) + ' ' + str(size // small))
		exit()
	else:
		size += 1


(n, a, b) = map(int, input().split())
n *= 6
swapped = False
if a > b:
	(a, b) = (b, a)
	swapped = True
(a, b) = (min(a, b), max(a, b))
(a1, b1) = (a, b)
s = 1 << 61
for i in range(a, int(n ** 0.5) + 1):
	j = max(b1, (n - 1) // i + 1)
	if i * j < s:
		s = i * j
		(a, b) = (i, j)
print(a * b)
if swapped:
	print(b, a)
else:
	print(a, b)


(n, a, b) = [int(x) for x in input().split()]
n *= 6
if a * b >= n:
	print(a * b)
	print(a, b)
else:
	reverse = False
	if b < a:
		reverse = True
		(a, b) = (b, a)
	low = float('inf')
	lowNums = [0, 0]
	for x in range(a, min(int(n ** 0.5), n // b) + 1):
		second = n // x
		if n % x != 0:
			second += 1
		if second * x < low:
			low = second * x
			lowNums = [x, second]
	if reverse:
		print(low)
		print(lowNums[1], lowNums[0])
	else:
		print(low)
		print(lowNums[0], lowNums[1])


def ceildiv(a, b):
	return a // b + (1 if a % b else 0)

def main():
	(n, a, b) = read()
	s = 6 * n
	if a * b >= s:
		print(a * b)
		print(a, b)
		return
	t = int((6 * n) ** 0.5)
	tgt = 9001 * n
	tgta = 0
	tgtb = 0
	for i in range(1, t + 1):
		c = ceildiv(s, i)
		if a <= i and b <= c:
			if tgt > i * c:
				tgt = i * c
				tgta = i
				tgtb = c
		if b <= i and a <= c:
			if tgt > i * c:
				tgt = i * c
				tgtb = i
				tgta = c
	print(tgt)
	print(tgta, tgtb)

def read(mode=2):
	inputs = input().strip()
	if mode == 0:
		return inputs
	if mode == 1:
		return inputs.split()
	if mode == 2:
		return list(map(int, inputs.split()))

def write(s='\n'):
	if s is None:
		s = ''
	if isinstance(s, list):
		s = ' '.join(map(str, s))
	s = str(s)
	print(s, end='')
write(main())


__author__ = 'trunghieu11 - vuondenthanhcong11@gmail.com'
(count, a, b) = map(int, input().split())
areaNeed = 6 * count
if a * b >= areaNeed:
	print(a * b)
	print(a, b)
	exit(0)
isSwap = False
if a > b:
	(a, b) = (b, a)
	isSwap = True
answerArea = 10 ** 10
answerA = -1
answerB = -1
for i in range(a, int(areaNeed ** 0.5) + 1):
	curB = (areaNeed + i - 1) // i
	if curB >= b:
		curArea = i * curB
		if curArea < answerArea:
			answerArea = curArea
			answerA = i
			answerB = curB
if isSwap:
	(answerA, answerB) = (answerB, answerA)
print(answerArea)
print(answerA, answerB)


import sys
from math import ceil
input = sys.stdin.readline
(n, a, b) = map(int, input().split())
if 6 * n <= a * b:
	print(a * b)
	print(a, b)
	exit()
p = 6 * n
flag = False
if a > b:
	(a, b) = (b, a)
	flag = True
ans = 10 ** 18
(ans_a, ans_b) = (-1, -1)
for i in range(1, int(p ** 0.5) + 1):
	u = i
	v = ceil(p / i)
	for rep in range(2):
		if a <= u and b <= v:
			if u * v < ans:
				ans_a = u
				ans_b = v
				ans = u * v
		elif a <= u and v <= b:
			if a <= ceil(p / b) and b * ceil(p / b) < ans:
				ans_a = ceil(p / b)
				ans_b = b
				ans = ceil(p / b) * b
		elif a >= u and b <= v:
			if b <= ceil(p / a) and a * ceil(p / a) < ans:
				ans_a = a
				ans_b = ceil(p / a)
				ans = a * ceil(p / a)
		(u, v) = (v, u)
print(ans)
if flag:
	print(ans_b, ans_a)
else:
	print(ans_a, ans_b)


def sep():
	return map(int, input().split())
import math

def prime(x):
	if x == 1:
		return False
	else:
		for i in range(2, int(math.sqrt(x)) + 1):
			if x % i == 0:
				return False
		else:
			return True

def main():
	(n, a, b) = sep()
	n = 6 * n
	flag = 0
	if a > b:
		flag = 1
	(a, b) = (min(a, b), max(a, b))
	ans = (a, b)
	tans = 1000000000000.0
	if a * b < n:
		for l in range(a, int(n ** 0.5) + 2):
			tmp = l * math.ceil(n / l)
			if tans > tmp and math.ceil(n / l) >= b:
				tans = tmp
				ans = (l, math.ceil(n / l))
	else:
		pass
	print(ans[0] * ans[1])
	if flag == 1:
		print(ans[1], ans[0])
	else:
		print(ans[0], ans[1])
main()


(n, a, b) = map(int, input().split())
n = 6 * n
s = a * b
if s >= n:
	print(s)
	print(a, b)
	return
m = int(n ** 0.5) + 1
s = (a + m) * (b + m)
for x in range(a, m):
	y = max((n - 1) // x + 1, b)
	if x * y < s:
		s = x * y
		(u, v) = (x, y)
for y in range(b, m):
	x = max((n - 1) // y + 1, a)
	if x * y < s:
		s = x * y
		(u, v) = (x, y)
print(s)
print(u, v)


(n, a, b) = map(int, input().split())
e = n * 6
while e > a * b:
	(q, w) = (min(a, b), max(a, b))
	for i in range(q, int(e ** 0.5) + 1):
		if e % i == 0:
			if q <= i and w <= e // i:
				(q, w) = (i, e // i)
				break
			if q <= e // i and w <= i:
				(q, w) = (e // i, i)
				break
	if b > a:
		(a, b) = (q, w)
	else:
		(a, b) = (w, q)
	if e > a * b:
		e += 1
print(a * b, a, b)


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	(s, a, b) = map(int, input().split())
	n = 6 * s
	if n <= a * b:
		print(a * b)
		print(a, b)
	else:
		while True:
			x = min(a, b)
			val = math.sqrt(n)
			while n % x != 0 and x <= val:
				x += 1
			if n // x >= max(a, b) and n % x == 0:
				print(n)
				if a < b:
					print(x, n // x)
				else:
					print(n // x, x)
				break
			n += 1
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))

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


def R():
	return map(int, input().split())

def I():
	return int(input())

def S():
	return str(input())

def L():
	return list(R())
from collections import Counter
import math
import sys
from itertools import permutations
import bisect
(n, a, b) = R()
if a * b >= 6 * n:
	print(a * b)
	print(a, b)
	exit()
maxs = math.inf
maxa = -1
maxb = -1
for newa in range(a, int(math.sqrt(6 * n)) + 1000):
	newb = math.ceil(6 * n / newa)
	newb = max(newb, b)
	if newa * newb < maxs:
		maxs = newa * newb
		maxa = newa
		maxb = newb
for newb in range(b, int(math.sqrt(6 * n)) + 1000):
	newa = math.ceil(6 * n / newb)
	newa = max(newa, a)
	if newa * newb < maxs:
		maxs = newa * newb
		maxa = newa
		maxb = newb
print(maxs)
print(maxa, maxb)


import sys
try:
	while True:
		(n, a, b) = map(int, input().split(' '))
		flag = False
		if a > b:
			flag = True
			(a, b) = (b, a)
		if 6 * n <= a * b:
			print(a * b)
			res = str(a) + ' ' + str(b)
			print(res)
			continue
		res = 1 << 60
		i = a
		ans1 = 0
		ans2 = 0
		while i * i <= 6 * n:
			tmp = 6 * n // i
			if tmp * i < 6 * n:
				tmp += 1
			if tmp < b:
				i += 1
				continue
			if i * tmp < res:
				res = i * tmp
				ans1 = i
				ans2 = tmp
			i += 1
		if flag:
			(ans1, ans2) = (ans2, ans1)
		print(res)
		ans = str(ans1) + ' ' + str(ans2)
		print(ans)
except EOFError:
	pass


import sys

def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep=' ', end='\n'):
	print(*var, file=sys.stderr, end=end, sep=sep)
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil, log2
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
(n, a, b) = I()
area = 6 * n
ans = INF
(ansa, ansb) = (a, b)
swap = 0
if b < a:
	swap = 1
	(a, b) = (b, a)
iter = 0
for i in range(a, INF):
	j = max(b, ceil(area / i))
	if j * i >= area and j * i <= ans:
		ans = j * i
		ansa = i
		ansb = j
	iter += 1
	if iter >= 100000:
		break
print(ans)
if swap:
	(ansa, ansb) = (ansb, ansa)
print(ansa, ansb)


from sys import stdin

def solve(tc):
	(n, a, b) = map(int, stdin.readline().split())
	if a * b >= 6 * n:
		print(a * b)
		print(a, b)
		return
	swapped = False
	mini = int(1e+18) + 1
	minv = (-1, -1)
	if a > b:
		(a, b) = (b, a)
		swapped = True
	base = 6 * n
	ma = a
	while True:
		if base // ma < b or ma * ma > base:
			break
		if base % ma == 0:
			print(base)
			if swapped:
				print(base // ma, ma)
			else:
				print(ma, base // ma)
			return
		mb = base // ma + 1
		if mini > ma * mb - base:
			mini = ma * mb - base
			minv = (ma, mb)
		ma += 1
	print(minv[0] * minv[1])
	if swapped:
		print(minv[1], minv[0])
	else:
		print(minv[0], minv[1])
tc = 1
solve(tc)


import math
(n, a, b) = map(int, input().split())
s = 6 * n
if a * b >= s:
	print(a * b)
	print(a, b)
else:
	(aa, bb) = (a, b)
	area = float('inf')
	_a = 0
	for i in range(min(math.ceil(s ** 0.5), s // max(a, b)), min(a, b) - 1, -1):
		_b = math.ceil(s / i)
		_s = _b * i
		if _s <= area:
			(area, _a) = (_s, i)
			if _s == s:
				break
	print(area)
	_b = area // _a
	if not (aa <= _a and bb <= _b):
		(_a, _b) = (_b, _a)
	print(_a, _b)


import math
(n, a, b) = map(int, input().split())
origa = a
origb = b
if a > b:
	(a, b) = (b, a)
(a1, b1) = (a, b)
cur = 10 ** 18
if a * b >= 6 * n:
	print(a * b)
	print(a, b)
	exit()
for x in range(a, int(math.sqrt(6 * n)) + 2):
	y = math.ceil(6 * n / x)
	if y <= b:
		continue
	if x * y < cur:
		a1 = x
		b1 = y
		cur = x * y
if a1 < origa or b1 < origb:
	(a1, b1) = (b1, a1)
print(cur)
print(a1, b1)


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 = 1000000007
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()]
(n, a, b) = value()
need = 6 * n
prod = inf
a1 = a
b1 = b
for here_a in range(a, int(sqrt(need)) + 1):
	here_b = max(b, Ceil(need, here_a))
	if here_a * here_b < prod:
		a1 = here_a
		b1 = here_b
		prod = here_a * here_b
for here_b in range(b, int(sqrt(need)) + 1):
	here_a = max(a, Ceil(need, here_b))
	if here_a * here_b < prod:
		a1 = here_a
		b1 = here_b
		prod = here_a * here_b
print(a1 * b1)
print(a1, b1)


def main():
	(n, a, b) = list(map(int, input().split()))
	s = 6 * n
	if a * b >= s:
		print(a * b)
		print(a, b)
		return
	(ma, mb) = (min(a, b), max(a, b))
	_s = float('inf')
	_a = 0
	for i in range(min(int(s ** 0.5) + 1, s // mb), ma - 1, -1):
		_b = (s + i - 1) // i
		si = i * _b
		if _s > si:
			(_a, _s) = (i, si)
			if si == s:
				break
	print(_s)
	_b = _s // _a
	if not (a <= _a and b <= _b):
		(_a, _b) = (_b, _a)
	print(_a, _b)

def __starting_point():
	main()
__starting_point()


from math import *
(n, a, b) = map(int, input().split())
flag = False
if b < a:
	(a, b) = (b, a)
	flag = True
if a * b >= 6 * n:
	print(a * b)
	print(a, b)
else:
	(mi, na, nb) = (5 * 10 ** 18, 5 * 10 ** 18, 1)
	for i in range(a, int(sqrt(6 * n) + 1)):
		j = max(b, ceil(6 * n / i))
		if 6 * n <= i * j and i * j < mi:
			mi = i * j
			na = i
			nb = j
	print(mi)
	if not flag:
		print(na, nb)
	else:
		print(nb, na)


import math
[n, a, b] = [int(d) for d in input().split()]
reverse = False
if a > b:
	reverse = True
	temp = b
	b = a
	a = temp
ba = a
bb = max(b, math.ceil(6 * n / a))
best = ba * bb
for a1 in range(a, math.floor(math.sqrt(6 * n)) + 1):
	if math.ceil(6 * n / a1) < b:
		break
	if a1 * math.ceil(6 * n / a1) < best:
		ba = a1
		bb = math.ceil(6 * n / a1)
		best = ba * bb
if reverse:
	temp = bb
	bb = ba
	ba = temp
print(str(best) + '\n' + str(ba) + ' ' + str(bb))


from math import sqrt, ceil

def main():
	(n, a, b) = [int(i) for i in input().split()]
	swaped = 0
	if a > b:
		(a, b) = (b, a)
		swaped = 1
	if a * b >= 6 * n:
		print(a * b)
		print(a, b)
		return 0
	new_a_max = ceil(sqrt(6 * n))
	ans = []
	for newa in range(a, new_a_max + 1):
		newb = ceil(6 * n / newa)
		if newa * newb >= 6 * n and newb >= b:
			ans.append([newa * newb, newa, newb])
	ans = sorted(ans)
	if swaped:
		(ans[0][1], ans[0][2]) = (ans[0][2], ans[0][1])
	print(ans[0][0])
	print(ans[0][1], ans[0][2])
main()


(n, a, b) = map(int, input().split())
n *= 6
if a * b >= n:
	print(a * b)
	print(a, b)
	exit(0)
z = 0
if b < a:
	(a, b) = (b, a)
	z = 1
(x, y) = (a, b)
area = 1e+18 + 1
for i in range(a, int(n ** 0.5) + 1):
	tb = n // i
	if i * tb < n:
		tb += 1
	if tb < b:
		continue
	if i * tb < area:
		area = i * tb
		(x, y) = (i, tb)
if z:
	(x, y) = (y, x)
print(area)
print(x, y)


import math
line = input().split()
n = int(line[0])
a = int(line[1])
b = int(line[2])
desired = 6 * n
if a * b >= desired:
	print(a * b)
	print(a, b)
else:
	smallest = min(a, b)
	largest = max(a, b)
	num = desired
	found = False
	while True:
		i = 0
		midpoint = math.floor(math.sqrt(num))
		while True:
			current = midpoint - i
			if current < smallest:
				break
			if num % current == 0 and num // current >= largest:
				found = True
				desired = num
				newSmallest = current
				newLargest = num // current
				break
			i += 1
		if found:
			break
		num += 1
	print(desired)
	if a < b:
		print(newSmallest, newLargest)
	else:
		print(newLargest, newSmallest)


import math
(n, a, b) = list(map(int, input().split()))
target = 6 * n
if target < a * b:
	p = a
	q = b
else:
	m = int(target ** 0.5) + 1
	s = (a + m) * (b + m)
	for i in range(a, m):
		bb = max(math.ceil(target / i), b)
		if i * bb < s:
			s = i * bb
			p = i
			q = bb
	for j in range(b, m):
		aa = max(math.ceil(target / j), a)
		if j * aa < s:
			s = j * aa
			p = aa
			q = j
print(p * q)
print(p, q)


import math
(n, a, b) = map(int, input().split())
if a * b >= n * 6:
	print(a * b)
	print(a, b)
	exit()
if a < n and a < 6 and (b < n) and (b < 6):
	print(n * 6)
	print(n, 6)
	exit()
if a == 6 and b < n or (b == 6 and a < n):
	print(n * 6)
	print(n, 6)
	exit()
if b > a:
	min = max(b, math.ceil(n * 6 / a)) * a
	novob = math.ceil(n * 6 / a)
	novoa = a
	for i in range(a, int(math.sqrt(6 * n)) + 1):
		bnovo = math.ceil(n * 6 / i)
		if min - n * 6 > bnovo * i - n * 6 and bnovo >= b:
			min = bnovo * i
			novoa = i
			novob = bnovo
	print(int(min))
	print(novoa, novob)
else:
	min = max(a, math.ceil(n * 6 / b)) * b
	novoa = math.ceil(n * 6 / b)
	novob = b
	for i in range(b, int(math.sqrt(6 * n)) + 1):
		anovo = math.ceil(n * 6 / i)
		if min - n * 6 > anovo * i - n * 6 and anovo >= a:
			min = anovo * i
			novob = i
			novoa = anovo
	print(int(min))
	print(novoa, novob)


import math
x = []
count = 0
(n, a, b) = map(int, input().split())
if a > b:
	count = 1
if a * b >= n * 6:
	print(a * b)
	print(a, b)
elif max(a, b) <= n and min(a, b) <= 6:
	print(n * 6)
	if count == 1:
		print(max(n, 6), min(n, 6))
	else:
		print(min(n, 6), max(n, 6))
else:
	for i in range(min(a, b), min(math.ceil(n * 6 / min(a, b)), int((6 * n) ** 0.5)) + 1):
		if math.ceil(n * 6 / i) >= max(a, b):
			x.append([math.ceil(n * 6 / i) * i, i])
	x.sort()
	print(x[0][0])
	if count == 1:
		print(max(x[0][1], x[0][0] // x[0][1]), min(x[0][1], x[0][0] // x[0][1]))
	else:
		print(min(x[0][1], x[0][0] // x[0][1]), max(x[0][1], x[0][0] // x[0][1]))


(n, a, b) = list(map(int, input().split()))
if a * b >= 6 * n:
	print(a * b)
	print(a, b)
else:
	(sq, ansx, ansy, ar) = (round((6 * n) ** 0.5), 1000000000.0, 1000000000.0, 1e+18)
	for i in range(1, sq + 6):
		(p, q) = (i, (6 * n + i - 1) // i)
		if max(p, q) >= max(a, b) and min(p, q) >= min(a, b):
			if ar > p * q:
				ar = p * q
				(ansx, ansy) = (min(p, q), max(p, q))
	print(ansx * ansy)
	if ansx >= a and ansy >= b:
		print(ansx, ansy)
	else:
		print(ansy, ansx)


(students_number, a, b) = [int(x) for x in input().split(' ')]
area_needed = students_number * 6
current_area = -1
if a < b:
	(x, y) = (a, b)
else:
	(x, y) = (b, a)
for i in range(1, area_needed + 1):
	(x_side, y_side) = (i, (area_needed - 1) // i + 1)
	if x_side > y_side:
		break
	x_side = max(x, x_side)
	y_side = max(y, y_side)
	if current_area == -1 or x_side * y_side <= current_area:
		current_area = x_side * y_side
		current_x = x_side
		current_y = y_side
if a < b:
	print(f'{current_area}\n{current_x} {current_y}')
else:
	print(f'{current_area}\n{current_y} {current_x}')


(n, a, b) = map(int, input().split())
if 6 * n <= a * b:
	print(a * b)
	print(a, b)
else:
	swap = False
	if a > b:
		swap = True
		(a, b) = (b, a)
	i = a
	newa = a
	newb = (6 * n + a - 1) // a
	square = newa * newb
	while i * i <= 6 * n:
		tmpb = (6 * n + i - 1) // i
		if not tmpb < b and tmpb * i <= square:
			(newa, newb, square) = (i, tmpb, tmpb * i)
		i += 1
	if swap:
		(newa, newb) = (newb, newa)
	print(square)
	print(newa, newb)


from math import ceil
(n, a, b) = [int(j) for j in input().split()]
n = 6 * n
flag = 0
if a > b:
	flag = 1
(a, b) = (min(a, b), max(a, b))
ans = (a, b)
tans = 1000000000000.0
if a * b < n:
	for l in range(a, int(n ** 0.5) + 2):
		tmp = l * ceil(n / l)
		if tans > tmp and ceil(n / l) >= b:
			tans = tmp
			ans = (l, ceil(n / l))
else:
	pass
print(ans[0] * ans[1])
if flag == 1:
	print(ans[1], ans[0])
else:
	print(ans[0], ans[1])


import math
(n, a, b) = map(int, input().split())
x = 6 * n - 1
if a * b > 6 * n:
	print(a * b)
	print(str(a) + ' ' + str(b))
	quit()
while True:
	x += 1
	for i in range(min(a, b), math.floor(math.sqrt(x)) + 1):
		if x % i == 0:
			if i >= a and x / i >= b:
				print(x)
				print(str(i) + ' ' + str(x // i))
				quit()
			if i >= b and x / i >= a:
				print(x)
				print(str(x // i) + ' ' + str(i))
				quit()