1. Problem 1:

    Given a positive integer there is an easy way to check whether this integer is divisible by 9 or not. (This was very popular before your mod operator was invented :-)) If you add the digits of the number repeatedly and finally get 9, then the given number is divisible by 9. Else it is not divisible by 9. for example


    Input Specification

    Input contains a single positive integer(< 10^10) (Use long long for the number)


    Output Specification

    Output "YES" or "NO" (quotes for clarity) corresponding to whether the number in input is divisible by 9 or not


    Sample Input and Output

    Input: 12101
    Output: NO
    Input: 9009
    Output: YES

  2. Problem 2:

    A whole number is said to be CIRCULAR if, when you multiply the number by its units decimal digit, the result is the number with its decimal digits rotated to the right, where the units digit becoming its high-order digit. For example, 102564 is a circular number because of the multiplication:
    				102564
          				      *4
    				-------
    				410256
    				-------
    



    Input Specification

    Input contains a single postive integer N( < 10).


    Output Specification

    Output must contain a smallest circular positive number whose units digit must be N.


    Sample Input and Output

    Input: 2
    Output:105263157894736842
    Input: 4
    Output: 102564
    Please note that result may not fit even in long long(64 bit integer).