If both a and b belong to the set {1,2,3,4}, then the number of equations of the form ax2+bx+1=0 having real roots is