# [Perl 5], <s>45</s> 44 bytes

<!-- language-all: lang-perl -->

 sub{$n=$q=1;!grep$_-$n|($n*=@_/$q++-1)*0,@_}

[Try it online!][TIO-ktmw0jsy]

[Perl 5]: https://www.perl.org/
[TIO-ktmw0jsy]: https://tio.run/##ZY/dCoMwDIXvfQonYfgTt7azDiYF30Q20O1CRK0OZNuzd@28sR05hJyEhC99PbZcQSOUnG8v6AQMgha7@1j3UKXQvUPoYlFWRxiSJKVRTLCsPqrwZln7T36gpPDkdfGDaZynx3IJVruHJqTRpkaGtj/psDscKTHiTj9HypERk3NndEamL3EjZpyZrjjNtZUWDbMWNc/GE8x0EJeX/EEzDZ1pwNx5ha/cv4/UFw "Perl 5 – Try It Online"

A translation of the JavaScript answer from @Arnauld. I'm at this point clueless to how and why this works.