public static void main(String[] args) {
	        Scanner scan = new Scanner(System.in);
	        HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>();
	        LinkedList<Integer> ll = new LinkedList<Integer>();
	        while (scan.hasNextInt()){
	            int aux = scan.nextInt();
	                if (!hm.containsKey(aux)) {
	                    hm.put(aux, 1);
	                    ll.add(aux);
	                } else
	                    hm.put(aux, hm.get(aux) + 1);
	        }
	        for (int i = 0; i < ll.size(); i++) 
	            System.out.println(ll.get(i) + " " + hm.get(ll.get(i)));
	    }