# 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;
}``````

• 本文已收录于以下专栏：

## codeforces 12A - Super Agent

• ymrfzr
• 2013年06月03日 07:14
• 415

## 【Codeforces Testing Round 12A】【讨论 边界元素映射】Divisibility 区间范围内k倍数的数的个数

A. Divisibility time limit per test 1 second memory limit per test 256 megabytes in...
• snowy_smile
• 2015年11月27日 09:23
• 737

## CodeForces 12A - Super Agent

• MrSiz
• 2015年09月11日 00:16
• 375

## 12A - Super Agent

A. Super Agent time limit per test 2 seconds memory limit per test 256 megabytes in...
• liuke19950717
• 2016年07月21日 09:42
• 183

## A. Super Agent

time limit per test 2 seconds memory limit per test 256 megabytes input standard input ...
• jj12345jj198999
• 2013年09月13日 09:02
• 1083

## CodeForces-12A-Super Agent

DescriptionThere is a very secret base in Potatoland where potato mash is made according to a specia...
• Ypopstar
• 2016年05月31日 22:17
• 210

## A. Super Agent

A. Super Agenttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutpu...
• u013077144
• 2016年04月21日 19:02
• 99

## Python解决codeforces ---- 4

• cgl1079743846
• 2013年10月07日 16:33
• 1438

## Microsoft Agent技术简介

• flyloafer
• 2006年04月23日 15:13
• 3130

## 什么是 agent

agent 是任何通过sensor感知其环境并通过actuators在此环境中作出行动的东西。 比如人agent：sensor 是眼睛，耳朵，以及其他器官，actuators 是手，腿，声道等。 ...
• cuit
• 2017年02月28日 17:23
• 336

举报原因： 您举报文章：CodeForces-12A-Super Agent 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)