#include<bits/stdc++.h>
using namespace std;
int n,t[2][1000005];
double ans;
int main()
{
cin >> n;
for(int i=1;i<=n;i++)
{
cin >> t[2][i];
t[1][i]=i;
}
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n-1;j++)
{
if(t[2][j]>t[2][j+1])
{
swap(t[2][j],t[2][j+1]);
swap(t[1][j],t[1][j+1]);
}
}
}
for(int i=1;i<=n;i++)
{
cout << t[1][i] << ' ';
}
cout << endl;
for(int i=1;i<=n-1;i++)
{
ans+=t[2][i];
}
ans=ans/(n-1);
printf("%.2f",ans);
return 0;
}