# CodeForces-12A-Super Agent

Description

There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agent Pearlo for many years. When, finally, Pearlo learned all secrets of espionage, he penetrated into the Potatoland territory and reached the secret base.

Now he is standing at the entrance, but to get inside he need to pass combination lock. Minute ago one of the workers entered the password on the terminal and opened the door. The terminal is a square digital keyboard 3 × 3 with digits from 1 to 9.

Pearlo knows that the password consists from distinct digits and is probably symmetric with respect to the central button of the terminal. He has heat sensor which allowed him to detect the digits which the worker pressed. Now he wants to check whether the password entered by the worker is symmetric with respect to the central button of the terminal. This fact can Help Pearlo to reduce the number of different possible password combinations.

Input

Input contains the matrix of three rows of three symbols each. Symbol «X» means that the corresponding button was pressed, and «.» means that is was not pressed. The matrix may contain no «X», also it may contain no «.».

Output

Print YES if the password is symmetric with respect to the central button of the terminal and NO otherwise.

Sample Input
Input

XX.

.XX

Output

YES

Input

X.X
X..

Output

NO

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;

int main()
{
char s[4][4];
for(int i=0;i<3;i++)
{
for(int j=0;j<3;j++)
{
scanf("%c",&s[i][j]);
}
// printf("1\n");
getchar();
}
if(s[0][0]==s[2][2]&&s[0][1]==s[2][1]&&s[0][2]==s[2][0]&&s[1][0]==s[1][2])
{
printf("YES\n");
return 0;
}
printf("NO\n");
return 0;
}

#### Agent及Multi-Agent系统

2010年04月13日 561KB 下载

#### Agent模型简介（ppt转的pdf）

2010年10月26日 166KB 下载

#### 软件agent技术

2011年10月26日 13.15MB 下载

#### 重点大学Agent课件

2012年04月10日 2.82MB 下载

#### Agent开发文档 开发Agent

2009年12月17日 699KB 下载

#### 多agent合作决策的agent可靠性研究

2012年06月16日 439KB 下载

#### 基于 Agent 的模型入门Python实现 读书笔记

2017-10-22 19:52:20

#### Proxy 和 Agent 区别

2011-05-25 11:11:00

#### 什么是 agent

2017-02-28 17:23:42

#### 面向Agent的系统架构

2014-12-20 21:34:48