#include<iostream>
#include<iomanip>
#include<vector>
using namespace std;
int main()
{
int x = 0;
vector<int>count;
int n;
while (cin >> n)
{
count.push_back(n);
}
int len = count.size();
for (int i = 0; i < len-1; i++)
{
// cout << count[i] << endl;
if (count[i] > count[i + 1])
{
x += 1;
}
}
if (x != 0)
{
cout << "NO" << endl;
}
else
{
cout << "YES" << endl;
}
return 0;
}
03-31
1285
11-29
2074