#include<stdio.h>
#include<stdlib.h>
#define N 1000
void main()
{
char a[N];
char tempchar;
int i = 0;
int j = 0;
int flag = 1;
memset(a, 0, N * sizeof (char));
for (i = 0; i < N; ++i)
{
if ((tempchar = getchar()) == EOF) break;
a[i] = tempchar;
}
j = i -1;
printf("\n");
for ( i = 0; i < j && a[i] != 0;)
{
if (a[i] == a[j]) { ++i; --j;}
else if (a[i] == ' ') ++ i;
else if (a[j] == ' ') --j;
else {flag = 0; break;}
}
if (1 == flag) printf("YES\n");
else printf("NO\n");
}
#include<stdlib.h>
#define N 1000
void main()
{
char a[N];
char tempchar;
int i = 0;
int j = 0;
int flag = 1;
memset(a, 0, N * sizeof (char));
for (i = 0; i < N; ++i)
{
if ((tempchar = getchar()) == EOF) break;
a[i] = tempchar;
}
j = i -1;
printf("\n");
for ( i = 0; i < j && a[i] != 0;)
{
if (a[i] == a[j]) { ++i; --j;}
else if (a[i] == ' ') ++ i;
else if (a[j] == ' ') --j;
else {flag = 0; break;}
}
if (1 == flag) printf("YES\n");
else printf("NO\n");
}