Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
What is the average goals when the last appearance was before 1984, there were more than 17 appearances, the first appearance was before 1961 and the position was mf?

### Inputs:
table_name: table, columns: ['Position', 'Appearances', 'Goals', 'First appearance', 'Last appearance']

### Response:
SELECT AVG Goals FROM table WHERE Last appearance < 1984 AND Appearances > 17 AND First appearance < 1961 AND Position = mf