Write down the solution for this math problem: Solve 1079 = 6*p + 50*p - 1282 - 831 for p.
57