Determine all possible values of a duodecimal (base 12) positive integer N, such that N is obtained by adding the squares of its digits.
Bonus Question:
Determine all possible values of a octodecimal (base 18) positive integer N, such that N is obtained by adding the squares of its digits.