Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- String s = in.next();
- String t = in.next();
- StringBuffer sb = new StringBuffer(s);
- StringBuffer tb = new StringBuffer(t);
- if (tb.equals(sb.reverse())) System.out.println("YES");
- else System.out.println("NO");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement