STRNO
When Varsha was travelling home, she saw a mysterious villa. Varsha is curious about this strange villa and wants to explore it. When she reached the entry gate, the guard gave her a problem to solve and said that he would allow her to enter the villa only if she solved it.
The guard gave Varsha two integers $X$ and $K$. Varsha needs to determine whether there is an integer $A$ such that it has exactly $X$ positive integer divisors and exactly $K$ of them are prime numbers.
Varsha found this problem really hard to solve. Can you help her?
For each test case, print a single line containing one integer: $1$ if a valid integer $A$ exists or $0$ if it does not exist.
Subtask #1 (15 points):
Subtask #2 (85 points): original constraints
1
4 2
1
Example case 1: $A = 6$ has $X = 4$ factors: $1$, $2$, $3$ and $6$. It also has exactly $K = 2$ prime factors: $2$ and $3$.