In an A.P., the first term is 8, nth term is -33 and the sum to first n terms is 123. Find n and d, the common difference.