Wow, i hoped there would be a simpler solution -
the mathematical one is probably the better one in Terms of Memory usage -
but the worse one in Terms of brain capabilities
! colX > colY ! this third condition i was missing ;
thanks a lot for the detailed answer !