If sum of first 6 terms of an AP is 36 and that of the first 16 terms is 256