If a and d are the first term and the common difference of an AP, Sn denotes the sum of n terms of an AP. If Sn=Pn+Qn2, what are a and d in terms of P and Q?