Paytm interview question

Segment even and odd numbers