Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official.
×

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

F. Row of Models

time limit per test

2 secondsmemory limit per test

512 megabytesinput

standard inputoutput

standard outputDuring the final part of fashion show all models come to the stage and stay in one row and fashion designer stays to right to model on the right. During the rehearsal, Izabella noticed, that row isn't nice, but she can't figure out how to fix it.

Like many other creative people, Izabella has a specific sense of beauty. Evaluating beauty of row of models Izabella looks at heights of models. She thinks that row is nice if for each model distance to nearest model with less height (model or fashion designer) to the right of her doesn't exceed *k* (distance between adjacent people equals 1, the distance between people with exactly one man between them equals 2, etc).

She wants to make row nice, but fashion designer has his own sense of beauty, so she can at most one time select two models from the row and swap their positions if the left model from this pair is higher than the right model from this pair.

Fashion designer (man to the right of rightmost model) has less height than all models and can't be selected for exchange.

You should tell if it's possible to make at most one exchange in such a way that row becomes nice for Izabella.

Input

In first line there are two integers *n* and *k* (1 ≤ *n* ≤ 5·10^{5}, 1 ≤ *k* ≤ *n*) — number of models and required distance.

Second line contains *n* space-separated integers *a*_{i} (1 ≤ *a*_{i} ≤ 10^{9}) — height of each model. Pay attention that height of fashion designer is not given and can be less than 1.

Output

Print «YES» (without quotes) if it's possible to make row nice using at most one exchange, and «NO» (without quotes) otherwise.

Examples

Input

5 4

2 3 5 2 5

Output

NO

Input

5 2

3 6 2 2 1

Output

YES

Input

5 2

5 3 6 5 2

Output

YES

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/10/2018 21:56:47 (d1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|