Leo has N lights in a row.
The lights are numbered 1 through N.
Each light is either on or off.
Leo wants to turn all the lights off.
He has N switches he may use.
The switches are also numbered 1 through N.
For each i, switch number i toggles the state of all lights whose numbers are multiples of i.
(For example, switch 3 will toggle the state of light 3, light 6, light 9, and so on.)
You are given the current state of all lights as a String state with N characters.
For each valid i, state[i] is either 'Y' (meaning that light i+1 is currently on) or 'N' (meaning that the light is off).
Determine the smallest number of switches Leo needs to press in order to turn off all the lights.
If there is no way to turn off all the lights, return -1 instead.