0

Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details.
An Elf is hopping on a chessboard which extends infinitely in all four directions. He moves like a generalized chess Knight: on each step, he moves X units horizontally and Y units vertically, or Y units horizont...