#CADDI2018BB. AtCoder Alloy
AtCoder Alloy
Score : points
Problem Statement
There are rectangular plate materials made of special metal called AtCoder Alloy. The dimensions of the -th material are ( vertically and horizontally).
Takahashi wants a rectangular plate made of AtCoder Alloy whose dimensions are exactly . He is trying to obtain such a plate by choosing one of the materials and cutting it if necessary. When cutting a material, the cuts must be parallel to one of the sides of the material. Also, the materials have fixed directions and cannot be rotated. For example, a material cannot be used as a plate.
Out of the materials, how many can produce an plate if properly cut?
Constraints
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Takahashi wants a plate.
- The dimensions of the first material are . We can obtain a plate by properly cutting it.
- The dimensions of the second material are . We can obtain a plate without cutting it.
- The dimensions of the third material are . We cannot obtain a plate, whatever cuts are made. Note that the material cannot be rotated and used as a plate.