Yes. But it does not seem to be efficient enough.

A one or two-liner should be enough. Maybe using the remainder // ?