Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         Scanner in = new Scanner(System.in);
  7.         String s = in.next();
  8.         String t = in.next();
  9.         StringBuffer sb = new StringBuffer(s);
  10.         StringBuffer tb = new StringBuffer(t);
  11.        
  12.         if (tb.equals(sb.reverse())) System.out.println("YES");
  13.         else System.out.println("NO");
  14.     }  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement