# [Pari/GP], 42 bytes

 a->[if(x<2,-1,(d=divisors(x))[#d-1])|x<-a]

[Try it online!][TIO-jgnh2sro]

[Pari/GP]: http://pari.math.u-bordeaux.fr/
[TIO-jgnh2sro]: https://tio.run/##LYrBCsMgEER/ZUkvCiu4bg8tJPkR8SCIRSitmFIs9N/tJvQww8ybqbEVc6sjwzKiWX3Jqs8ODaFKSyrvsj3bprrW/pQMBf3ts4lhxFrvHxXBrFBbebwkTnuZIKuoNYL3hOAQGOGMQFYkgDjIRFaqO4yJ3c4lyPl4EV/I2esfcgh6/AA "Pari/GP – Try It Online"