Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Iran
- {
- class Amir
- {
- public static void Main()
- {
- string a=Console.ReadLine();
- string b=Console.ReadLine();
- bool ok=true;
- if(a.Length!=b.Length)
- ok=false;
- for(int i=0;ok&&i<a.Length;++i)
- {
- if(a[i]!=b[a.Length-i-1])
- {
- ok=false;
- break;
- }
- }
- if(ok)
- Console.WriteLine("YES");
- else
- Console.WriteLine("NO");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement