Sum And Product#1567

Sum And Product

1 second
128 megabytes
Very easy

A list of non-negative numbers is called satisfactory if the sum of the numbers in the list is equal to and the product is equal to . Find a satisfactory list with the smallest possible number of elements.

Input

Each line is a separate test case and contains two non-negative integers and (1 \leq s,\, p \leq 10^9).

Output

For each test case, output the smallest possible size of a satisfactory list in a separate line. If such a list does not exist, output -1. Note that the list may contain non-integer numbers.

Examples

Example 1

Loading
Loading