AT_past202209_e 棒倒しゲーム

Description

Let us play a game of bowling consisting of $ R $ rounds. Each round goes as follows. - Place $ N $ pins. - Repeat the following procedure $ M $ times. - Throw a ball toward them, and record the number of pins knocked down as the score. - Remove the pins knocked down. - If all $ N $ pins have been removed, end the round even if this procedure is not repeated $ M $ times. You are given a sequence of $ L $ integers: $ s=(s_1,s_2,\ldots,s_L) $ . Determine whether this can be a sequence of scores recorded in order in the whole game.

Input Format

Input is given from Standard Input in the following format: > $ R $ $ N $ $ M $ $ L $ $ s_1 $ $ s_2 $ $ \ldots $ $ s_L $

Output Format

If $ s $ can be a sequence of scores recorded in order in the whole game, print `Yes`; otherwise, print `No`.

Explanation/Hint

### Sample Explanation 1 In the first round, $ 7 $ and then $ 3 $ pins are knocked down. In the second round, $ 0 $ , $ 2 $ , $ 4 $ , $ 0 $ , and then $ 1 $ pin(s) are knocked down. In the third round, $ 0 $ and then $ 10 $ pins are knocked down. ### Constraints - $ 1 \leq R,N,M \leq 100 $ - $ R \leq L \leq R\times M $ - $ 0 \leq s_i \leq N $ - All values in input are integers.