Determine the number of ordered quadruples $(a,b,c,d)$ of integers, where $a,b,c,d$ are integers between $1$ and $3$ inclusive, such that the pairs $(a,b)$ and $(c,d)$ form a basis of the coordinate plane. A pair $(a,b)$ and $(c,d)$ form a basis if $ad \neq bc$.

Let's think step by step and output the final answer within \boxed{}.
user