Monica has decided to make cupcakes for the New Year Party. She has n food-color drops. She wants to add some drops to the cupcake. She wants your help to find the number of distinct colored cupcakes that can be made using none or some of the color drops. Monica has represented colors in {r,g,b} form, which represents {intensity of red color, intensity of green color, intensity of blue color}. Suppose n colors ({r1, g1, b1}, {r2, g2, b2}, ... {rn, gn, bn}) are added in cupcake then the color of cupcake will be {r1 + r2 + ... + rn, g1 + g2 + ... + gn, b1 + b2 + ... + bn}.
Note:- Two colors {r1, g1, b1} and {r2, g2, b2} are considered same if all the three conditions:- (1) r1/g1 = r2/g2, (2) g1/b1 = g2/b2 and (3) r1/b1 = r2/b2 are satisfied. For e.g. {2, 4, 6} and {3, 6, 9} are considered same as r1/g1 = 2/4 = r2/g2 = 3/6 = 0.5, g1/b1 = 4/6 = g2/b2 = 6/9 = 0.66 and r1/b1 = 2/6 = r2/b2 = 3/9 = 0.33.
See the sample case for better understanding.
Input format:
First line contains an integer n denoting the number of food-color drops.
Next n lines contains 3 integers(ri, gi, bi), denoting the {r, g, b} of the ith food-color.
Output format:
Print the number of distinct colored cupcakes possible.
Constraints:
1 <= n <= 20
0 <= ri, gi, bi <= 100000
Different possible colors of cupcakes are:-
{0,0,0} considering no color added.
{1,2,3} considering first color added.
{3,7,2} considering second color added.
{4,9,5} considering both color added.
Hence answer is 4.