If the sum and product of roots of the quadratic equation ax2−5x+c are both equal to 10, find the value of a and c.