x^2-7x+6=0 and y^2-14y+40=0