{"raw_statement":[{"iden":"statement","content":"Катя собирается поехать в другой город на сборы по программированию и, конечно, самое главное в этом вопросе – это собрать чемодан. Набор одежды Кати состоит из футболки и джинсов. Катя знает, что сборы продлятся $k$ дней и планирует положить в чемодан $n$ футболок и $m$ джинсов. Заметим, что ещё один дополнительный комплект одежды будет надет на Кате во время поездки.\n\nРазумеется, для Кати очень важно не появляться во время сборов дважды в одном и том же наборе одежды. Более формально, ни для какого дня не должно оказаться так, чтобы Катя в этот день была одета в те же джинсы и футболку, в которые она была одета в какой-то из предыдущих дней. При этом Катю устроит, если какие-то наборы одежды совпадут только футболкой или только джинсами.\n\nУдастся ли Кате добиться желаемого?\n\nВ единственной строке записаны три числа: $k$, $n$, $m$ ($1 <= k <= 10^9$, $0 <= m, n <= 1000$).\n\nЕсли Катя сможет исполнить желаемое – выведите «Yes», иначе выведите «No» (ответ выводится без кавычек).\n\nВ первом примере, сборы длятся всего один день и Кате нет необходимости брать с собой дополнительную одежду.\n\nВо втором примере, Катя в оба дня окажется в той одежде, в которой осуществит поездку.\n\nМожно показать, что в третьем примере возможно в каждый из пяти дней выбирать новый комплект одежды.\n\n"},{"iden":"входные данные","content":"В единственной строке записаны три числа: $k$, $n$, $m$ ($1 <= k <= 10^9$, $0 <= m, n <= 1000$)."},{"iden":"выходные данные","content":"Если Катя сможет исполнить желаемое – выведите «Yes», иначе выведите «No» (ответ выводится без кавычек)."},{"iden":"примеры","content":"Входные данные1 0 0\nВыходные данныеYesВходные данные2 0 0\nВыходные данныеNoВходные данные5 1 2\nВыходные данныеYes"},{"iden":"примечание","content":"В первом примере, сборы длятся всего один день и Кате нет необходимости брать с собой дополнительную одежду.Во втором примере, Катя в оба дня окажется в той одежде, в которой осуществит поездку.Можно показать, что в третьем примере возможно в каждый из пяти дней выбирать новый комплект одежды."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ N, K \\in \\mathbb{Z}^+ $ with $ 2 \\leq N \\leq 10^9 $ and $ 1 \\leq K \\leq N $.  \nLet the road be a circular ring of $ N $ cells, labeled $ 0 $ to $ N-1 $ (modular arithmetic).  \nLet $ m = 1, 2, 3, \\dots $ denote the index of the $ m $-th ant.  \nThe $ m $-th ant starts at cell $ s_m = (m - 1) \\bmod N $.  \n\nThe total lifetime of the $ m $-th ant is:  \n$$\nT_m = K + \\left\\lfloor \\frac{K}{2} \\right\\rfloor + \\left\\lfloor \\frac{K}{3} \\right\\rfloor + \\cdots + \\left\\lfloor \\frac{K}{p_m + 1} \\right\\rfloor\n$$  \nwhere $ p_m $ is the number of mushrooms eaten by the $ m $-th ant before death.  \n\nThe ant dies at cell:  \n$$\nd_m = (s_m + T_m - 1) \\bmod N\n$$  \nA mushroom grows at $ d_m $ after death.  \n\nThe ant eats a mushroom at cell $ c $ if and only if it passes through $ c $ at some time $ t < T_m $, and a mushroom is present there (i.e., previously left by an earlier ant that died there).  \n\n**Constraints**  \n- Mushrooms persist until eaten.  \n- Each cell holds at most one mushroom at a time.  \n- An ant eats mushrooms in the order it encounters them, and each mushroom extends its lifetime by $ \\left\\lfloor \\frac{K}{q} \\right\\rfloor $, where $ q $ is the number of mushrooms eaten so far + 1.  \n- The process is deterministic: the path and mushroom consumption of each ant depend on the history of prior deaths.  \n\n**Objective**  \nFind the smallest $ m \\geq 1 $ such that the $ m $-th ant returns to its starting cell $ s_m $ at the end of its lifetime (i.e., $ d_m = s_m $).  \nIf no such $ m $ exists, output $ -1 $.","simple_statement":"A helicopter flies over a circular road with N cells, numbered 1 to N clockwise. It drops ants one by one, each starting at the current helicopter position. Each ant runs clockwise, moving 1 cell per minute, and dies after K minutes, leaving a mushroom at its death cell. After each death, the helicopter moves one cell clockwise and drops the next ant.\n\nWhen an ant passes a mushroom, it eats it. The first mushroom adds ⌊K/2⌋ minutes, the second adds ⌊K/3⌋, the third ⌊K/4⌋, etc. So if an ant eats P mushrooms, it lives K + ⌊K/2⌋ + ⌊K/3⌋ + ... + ⌊K/(P+1)⌋ minutes total.\n\nIf an ant returns to its starting cell after running, it becomes a hero and the helicopter leaves. Find the number of the hero ant (starting from 1), or -1 if no ant ever becomes a hero.","has_page_source":false}