JBMO 2023  | Problem 2 - Official Solution