public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		Map<Integer, Num> map = new HashMap<Integer, Num>();
		int n = Integer.parseInt(cin.nextLine());
		for (int i = 0; i < n; i++) {
			Num x = readNum(cin);
			if (map.containsKey(x.getNumber())) {
				map.get(x.getNumber()).more();
			} else {
				map.put(x.getNumber(), x);
			}
		}

		List<Num> xs = new ArrayList<Num>();
		for(Num x : map.values()) {
			if(x.getCount() > 1) {
				xs.add(x);
			}
		}
		
		if(xs.size() == 0) {
			System.out.println("No duplicates.");
		} else {
			Collections.sort(xs);
			for(Num x : xs) {
				System.out.println(x);
			}
		}
	}