CREATE TABLE table_10505 ("Driver" TEXT, "Constructor" TEXT, "Laps" FLOAT, "Time/Retired" TEXT, "Grid" FLOAT)

What is the average grid number for cars that retired due to engine failure before 18 laps?
SELECT AVG("Grid") FROM table_10505 WHERE "Time/Retired" = 'engine' AND "Laps" < '18'
SELECT AVG("Grid") FROM "table_10505" WHERE "Laps" < '18' AND "Time/Retired" = 'engine'