Function: invert(divide(square(numbers("per") if mean(numbers("per"), numbers('xry')) > numbers('xry') if mean(numbers("per"), numbers('xry')) > numbers('yxy') else numbers("per") else numbers('xry')), numbers("per") if numbers('xry') > mean(numbers("per"), numbers('xry')) else numbers("per") if mean(numbers("per"), numbers('xry')) > numbers('xry') else numbers('yxy')))