Apply pigeonhole principle (#720)