Below is an context that describes a sql query, paired with an question that provides further information. Write an answer that appropriately completes the request.  # noqa: E501
### Context:
CREATE TABLE table_name_97 (rank INTEGER, city VARCHAR)
### Question:
What is teh average rank of the city of mashhad, which had less than 667770 in 1976?
### Answer:
SELECT AVG(rank) FROM table_name_97 WHERE city = "mashhad" AND 1976 < 667770