Each of a, b and c is equal to a number from the list 3^{1}, 3^{2}, 3^{3}, 3^{4}, 3^{5}, 3^{6}, 3^{7}, 3^{8}. There are N triples (a, b, c) with a \leq b \leq c for which each of \frac{a b}{c}, \frac{a c}{b} and \frac{b c}{a} is equal to an integer. What is the value of N ?