# [Jelly], 16 bytes

    L€SḶ0ẋ;þµ^þ/ẎẠ€Ẹ

[Try it online!][TIO-j9sr618l]

[Jelly]: https://github.com/DennisMitchell/jelly
[TIO-j9sr618l]: https://tio.run/##y0rNyan8/9/nUdOa4Ic7thk83NVtfXjfoa1xh/fpP9zV93DXAqDMw107/v//H22oY6BjGKsDpQE "Jelly – Try It Online"

For whatever reason, you need to input the falsy test case `[1, 0, 1]` as `[[[1, 0, 1]]]`; I think that's because of the way Jelly processes input.