Vasily Pupkin, a permanent member of NetOI, was awarded a trip to the country of Olympia. But everything requires money. Sponsors transferred a certain amount to his account in the required currency and, of course, informed Vasily about this amount. When he arrived in Olympia and went to the bank to collect his money, the amount in the documents turned out to be different, and at first glance, much larger. Vasily was very happy. But after talking with the bank officer, he realized that his joy was unfounded: no extra money was added; it was simply that a different (fortunately, positional!) number system was used in Olympia. Thanks to his good mathematical training, Vasily immediately found the base of the numeral system used in Olympia. Do the same.
Two integers are given: one in decimal system, and the other in a system with base (2 \leq n < 10). Each number contains at least and at most digits.
Print the base of the numeral system. It is guaranteed that a solution exists.
Example 1
Example 2