If the curves ax2+4xy+2y2+x+y+5=0 and ax2+6xy+5y2+2x+3y+8=0 intersect at four con-cyclic points then the value of a is