#C14165. Unique Products Count
Unique Products Count
Unique Products Count
You are given a list of N pairs of integers. For each pair, compute the product of the two integers and then determine how many distinct products are obtained.
Note that the product of any two integers is defined as:
$$ product = a \times b $$
Your task is to count the number of unique products.
inputFormat
The first line of the input contains an integer N (0 ≤ N ≤ 105) — the number of pairs. Each of the following N lines contains two space-separated integers a and b (-109 ≤ a, b ≤ 109).
outputFormat
Output a single integer — the count of unique products obtained by multiplying the two integers in each pair.
## sample4
2 3
4 1
2 3
5 6
3
</p>