i have a math problem i cant figure out.it is about input and out put algebraic expression.

INPUT P-24 18 14 12 08
OUTPUT N-10 07 05 04 02