By Carlos de Salles, UFMA Brazil
You know how it works. Stickers are bought in packs and you never know which ones come in the sealed pack. For this reason, there are many repeated stickers. Consider that a sticker is repeated if it is the second copy or more of it.
Your sticker collection is very messy, so you want to organize it. The idea, to start with, is to count how many different stickers and how many stickers are repeated in your collection.
Each sticker is represented in your collection as an integer ranging from 1 to 300. Given your collection with
The input consists of a first line containing an integer N, which can vary from 3 to 10000. The integer N represents the number of stickers in your collection. After that, there are N lines containing, each one, a sticker number, which can be an integer from 1 to 300.
The output consists of two lines. The first one tells you how many different stickers you have in your collection. The second line, on the other hand, tells you the amount of repeated stickers that your collection has.
Input Samples | Output Samples |
3 |
2 |
5 |
5 |
4 |
1 |
8 |
6 |