Find the perfect square! Your task is to turn a square root like this:
√12

into a form like this:
2√3

For our purpose, we only need to output the left number here:
2

Test cases
4  -&gt; 2
9  -&gt; 3
12 -&gt; 2
13 -&gt; 1
108-&gt; 6

Specifications

You may assume for the input that \$n&gt;0\$. \$n\$ has to be as large as possible.
If the number is already a perfect square, do this:

√4 = 2√1 -&gt; 2


If the number doesn't contain perfect squares, do this:

√13 = 1√13 -&gt; 1
05AB1E, 9 6 5 bytes
LnIÖO

Try it online or verify all test cases.
Previous 9 6 bytes approach:
LR.ΔnÖ

-3 bytes thanks to @ovs.
Try it online or verify all test cases.
Explanation:

L       # Push a list in the range [1, (implicit) input]
 n      # Take the square of each value in the list
  IÖ    # Check which squares are divisible by the input (1 if truthy; 0 if falsey)
    O   # And sum those checks
        # (after which this sum is output implicitly as result)

L       # Push a list in the range [1, (implicit) input]
 R      # Reverse it to [input, 1]
  .Δ    # Find the first value in this list which is truthy for:
    n   #  Square the current value
     Ö  #  Check if the (implicit) input is evenly divisible by this square
        # (after which the found value is output implicitly as result)