Divisible by 8#8593

Divisible by 8

1 second
128 megabytes
Medium

Given big integer . Can you rearrange its digits so that the resulting number is divisible by ? If there are multiple answers, print the smallest. Do not print the leading ''.

Input

One big integer (1 \leq |n| \leq 1000, where denotes the number of digits in number , n \geq 1)

Output

If the solution does not exist, print . Otherwise print the required minimum number.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading