Give a big- $O$ estimate for the number of operations, where an operation is a comparison or a multiplication, used in this segment of an algorithm (ignoring comparisons used to test the conditions in the for loops, where $a_{1}, a_{2}, \ldots, a_{n}$ are positive real numbers).
$$
\begin{array}{c}{m :=0} \\ {\text { for } i :=1 \text { to } n} \\ {\quad \text { for } j :=i+1 \text { to } n} \\ {m :=\max \left(a_{i} a_{j}, m\right)}\end{array}
$$