Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- static boolean Compare(String a,String b)
- {
- if (a.length()!=b.length()) return false;
- for (int i=0,Length=a.length();i<Length;i++)
- {
- if (a.charAt(i)!=b.charAt(i)) return false;
- }
- return true;
- }
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- String a=in.nextLine();
- String b=in.nextLine();
- if (Compare(a,b)) System.out.println("YES");
- else System.out.println("NO");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement