Part of 2023 Kazakhstan National Olympiad
Source: Kazakhstan Junior National Olympiad 2023/ Problem 4