This problem teaches you to write functions that return boolean values. When you need to check a condition, write a function that returns true or false. This makes your code self-documenting and testable.
Multi-dimensional data requires tracking multiple accumulators. You maintained three separate sums, one per dimension. This pattern extends to higher dimensions or different types of aggregation.
Separation of concerns makes code cleaner. Your equilibrium check lives in one function, input/output in another. This division lets you test the logic independently of how data enters and exits.