CREATE TABLE table_name_69 (grid INT, time_retired VARCHAR, laps VARCHAR)

What is the average grid number for cars that retired due to engine failure before 18 laps?
SELECT AVG(grid) FROM table_name_69 WHERE time_retired = "engine" AND laps < 18
SELECT AVG("grid") FROM "table_name_69" WHERE "engine" = "time_retired" AND "laps" < 18