JavaScript, 36 bytes n=>n==(g=d=>--d?(n%d?1:d)*g(d):1)(n) Try it online!
posted 2mo ago by Shaggy
# JavaScript, 36 bytes n=>n==(g=d=>--d?(n%d?1:d)*g(d):1)(n) [Try it online!](https://tio.run/##BcHBCoAgDADQrwm2YId1CmH6LdJU7DDCxD5/vXfnld9r9GfSOr2Km0QTgSYqkUgT2KaJg@LeQDEwgqF/o88CFfhA9B)