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

Name the highest laps for time/retired of engine and grid of 5
SELECT MAX("Laps") FROM table_10171 WHERE "Time/Retired" = 'engine' AND "Grid" = '5'
SELECT MAX("Laps") FROM "table_10171" WHERE "Grid" = '5' AND "Time/Retired" = 'engine'