Question: How to check whether the maxima of two sequences have the same subscript?

Let's say I define L1..L5 and M1..M5 respectively

for i to 5 do:
L[i]:=(-i^2+6*i);
end do;

for i to 5 do:
M[i]:=(-i^3+18*i);
end do;

Now I want to find out, whether the maxima of the two sequences L1..L5 and M1..M5 have the same subscript.
So I need a kind of proc that outputs 'true', if subscript(max(L1..L5))=subscript(max(M1..M5)), 'false' for subscript(max(L1..L5))<>subscript(max(M1..M5)) and 'FAIL' otherwise.

Does anyone know, how to achieve that in a simple way?

Thanks for answering.

Please Wait...