I'm wondering if a formula exists for solving my problem. I need to take pretty much any size number, and break it down into two numbers between 0-9.

I.e.

24 = 6 * 4 <--simple formula of number f(a,b) = a * b
81 = 9 * 9 <--thats the highest with a simple formula, there must be some other formula obviously that will do this:

f(a, b) = a * (b * b)
f(2, 5) = 8 * (9 * 9) = 648

While 648 is a low high number for me(if that makes sense) the thing is I would like to be able to break it back down to two single integers through some sort of formula....kind of like:

a = square_root(729) / b
b = 729 - a



I know that doesn't make much sense(my formula) as it won't work properly with any given number..but hopefully someone has some clue to what I'm trying to ask here..

Thanks guys!
Mitchel