I'm assuming that this is a competition, homework or self learning exercise, and that complete solutions would be self-defeating.
You need to work out a way to represent large numbers as arrays of smaller numbers, then do arithmetic using this representation. This is essentially what BigInteger does under the hood. Think about how you do arithmetic with a pencil and paper, and generalize that.
And if your puzzle doesn't allow you to use arrays, you could simulate them (horribly inefficiently) with input and output streams.
But I'm coming to the conclusion that this is not a real question at all ...