Martinez on first win of season with 5-3 win over Detroit