#include #include using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=1000000007; ll inf=1009999999999999990; int main(){ ll n; cin >> n; vectora(n); ll sum=0; for (ll i = 0; i < n; i++) { cin >> a[i]; sum+=a[i]; } if (sum%n==0) { sort(a.begin(),a.end()); for (ll i = 1; i < n; i++) { if (a[i]-a[i-1]