CREATE TABLE table_name_69 (grid INTEGER, time_retired VARCHAR(255), laps VARCHAR(255))
What is the average grid number for cars that retired due to engine failure before 18 laps?
    
SQL: SELECT AVG(grid) FROM table_name_69 WHERE time_retired = "engine" AND laps < 18