@@ -0,0 +1,996 @@
+import java.io.BufferedReader;%0Aimport java.io.InputStreamReader;%0A%0Aclass Same %7B%0A    public static void main(String args%5B%5D ) throws Exception %7B%0A               String Flag=%22NO%22;%0A    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));%0A                 String st1=in.readLine();%0A                 String st2=in.readLine();%0A                 if(st1.length()==st2.length())%0A                 %7B%0A                     for(int i=0;i%3Cst1.length();i++)%0A                     %7B%0A                        CharSequence ch=String.valueOf(st1.charAt(i));%0A                      if(st2.contains(ch))%0A                      %7B%0A                          st2=st2.replaceFirst(ch.toString(),%22%22);%0A                          Flag=%22YES%22;%0A                      %7D%0A                      else%0A                      %7B%0A                          Flag=%22NO%22;%0A                          break;%0A                      %7D%0A                     %7D%0A                 %7D%0A                 System.out.println(Flag);%0A              %7D%0A%7D%0A

Create Same.java