`#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
list<int> lst;
int val;
while (cin >> val && val != -1)
{
lst.push_back(val);
}
int f = 0;
for (int i = lst.front(), j = lst.back(); i < j; i++, j--)
{
if (i != j)
{
f = 1;
break;
}
}
if (f)
{
cout << "NO\n";
}
else
cout << "YES\n";
}`
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)