|All-time Popular Problems|
|Check if subtree|
|Delete Middle of Linked List|
|Given a linked list of 0s, 1s and 2s, sort it.|
|Count nodes of linked list|
|Delete N nodes after M nodes of a linked list|
|Check for Balanced Tree|
|Remove every k'th node|
|k largest elements|
|0 - 1 Knapsack Problem|
|Subarray with given sum|
You are given 2 numbers (N , M) the task is to find N√M (Nth root of M).
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains two space separated integers N and M.
For each test case in a new line print an integer denoting Nth root of M if the root is an integer else print -1.