Write a function or program which takes a positive decimal number, call it A, and output two positive numbers, B and C, such that:
- A == B bitxor C
- B and C must not contain any of the digits 0, 3 or 7 in its decimal representation.
>>> decompose(3) 1, 2 >>> decompose(7) 1, 6 >>> decompose(718) 121, 695 >>> decompose(99997) 2, 99999 >>> decompose(4294967296) 4294968218, 922 >>> decompose(5296080632396965608312971217160142474083606142654386510789497504098664630388377556711796340247136376) 6291484486961499292662848846261496489294168969458648464915998254691295448225881546425551225669515922, 1191982455588299219648819556299554251659915414942295896926425126251962564256469862862114191986258666
Since the decomposition is not unique, your function/program does not need to output the exact same results as these provided examples.
Very detailed rules
Submissions should be in the form of a complete function or program.
importstatements do count towards the final score.
You may assume the input A always contains at least a digit of 0, 3 or 7.
You may assume a decomposition always exist.
You may use BigInt if they are part of the standard libraries of the language, or can be installed through the language's de jure package manager.
The function should be fast. It should take no more than 20 seconds to run on reasonably modern computer when fed a 100-digit number, and no more than 2 seconds when fed a 10-digit number.
The function/program should support input up to at least 100 digits.
- If the function/program can only support integers up to N<100 digits, there will be a penalty of +10×(100/N - 1) bytes to the final score. This is to encourage golfers to support a wider range of numbers even if importing may be verbose.
There is no restriction on the presentation of input/outputs as long as they are clearly in decimal representation.
- The function may input and output strings/BigInts if the built-in integer types are not sufficient.
- The input may come from the function parameter, command line argument or STDIN.
- The function may return the result, or just print the result directly to STDOUT.
- However, signed overflow in the input/outputs are not allowed.
- Approximate answers are not tolerated, the input/outputs must be exact.
This is a code-golf. Shortest solution in bytes win.
There is a penalty if the program can only support numbers less than 100 digits:
- 64-bit integers (19 digits) = +42 bytes
- 63-bit integers (18 digits) = +45 bytes
- 53-bit integers (15 digits) = +56 bytes
- 31/32-bit integers (9 digits) = +101 bytes