/*Based on the question at the link:
https://www.hackerrank.com/challenges/ctci-ransom-note
*/
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class RansomNote {

    public static void main(String[] args) {
        Solution sln = new Solution();
        Scanner in = new Scanner(System.in);
        int m = in.nextInt();
        int n = in.nextInt();
        
        if(m<n){
            System.out.println("No");
            return;
        }
        
        HashMap<String,Integer> magazine = new HashMap<String,Integer>();
        for(int magazine_i=0; magazine_i < m; magazine_i++){
            String s = in.next();
            if(magazine.containsKey(s)){
                magazine.put(s, magazine.get(s)+1);
            }
            else{
                magazine.put(s, 1);
            }
        }
        
        sln.printMap(magazine, -1);
        
        for(int ransom_i=0; ransom_i < n; ransom_i++){
            String s = in.next();
            if(!magazine.containsKey(s)){
                System.out.println("No");
                return;
            }
            else{
                int count = magazine.get(s);
                sln.printMap(magazine, ransom_i);
                if(count<0){
                    System.out.println("No");
                    return;
                }
                magazine.put(s, --count);
            }
        }
        System.out.println("Yes");
    }
    
    void printMap(HashMap<String, Integer> h, int i){
        System.out.println("\nLoop:"+i);
        for (HashMap.Entry<String, Integer> entry : h.entrySet()) {
            System.out.println(entry.getKey()+" : "+entry.getValue());
        }
    }
}

@@ -219,16 +219,36 @@
 mNote %7B%0A
+    //starting point
 %0A    pub
@@ -524,32 +524,52 @@
      %7D%0A        %0A
+        //main data%0A
         HashMap%3C
@@ -915,32 +915,34 @@
        %0A        
+//
 sln.printMap(mag
@@ -952,16 +952,24 @@
 ne, -1);
+ //debug
 %0A       
@@ -962,32 +962,52 @@
 /debug%0A        %0A
+        //test data%0A
         for(int 
@@ -1280,16 +1280,18 @@
         
+//
 sln.prin
@@ -1315,16 +1315,128 @@
 nsom_i);
+  //debug%0A                magazine.put(s, --count);%0A                //sln.printMap(magazine, ransom_i);  //debug
 %0A       
@@ -1553,50 +1553,8 @@
   %7D%0A
-                magazine.put(s, --count);%0A
     
@@ -1615,24 +1615,60 @@
 %0A    %7D%0A    %0A
+    //printing method for debugging%0A
     void pri

Update RansomNote.java