Consider the number of times the inner loop is executed and how many primitive operations occur in each iteration, and then do the same for the outer loop.