The sum of 4th and 8th terms of an A.P. is 24 and the sum of the 6th and 10th terms is 34. Find the first term and the common difference of the A.P.