#C11885. Distinct Rectangle Areas

    ID: 41250 Type: Default 1000ms 256MiB

Distinct Rectangle Areas

Distinct Rectangle Areas

You are given n rectangles. Each rectangle is described by its length and width. The task is to find the number of distinct areas computed by the formula area = \(l \times w\) where \(l\) is the length and \(w\) is the width.

For example, if you have rectangles with dimensions \((4,5)\), \((2,3)\) and \((4,5)\), the distinct areas are \(20\) and \(6\), so the answer is 2.

Your program should read input from standard input (stdin) and write the result to standard output (stdout).

inputFormat

The first line contains an integer n which represents the number of rectangles. The following n lines each contain two integers l and w representing the length and width of a rectangle.

Example:

3
4 5
2 3
4 5

outputFormat

Output a single integer representing the number of distinct rectangle areas.

Example:

2
## sample
3
4 5
2 3
4 5
2