#include
#include
#include
#pragma GCC optimize("Ofast")
#define ll long long
#define ld long double
using namespace std;
signed main() {
ll n;
cin >> n;
ll a[n];
for(ll i = 0; i < n; i++)
cin >> a[i];
ld sum = 0, sumkv = 0, sum6 = 0;
ll prod = 1;
for(ll i = 0; i < n; i++){
sum += a[i];
prod *= a[i];
if(i < 6)
sum6 += a[i];
sumkv += pow(a[i],2);
}
ll sum_k = 0;
ll k1,k2;
cin >> k1 >> k2;
for(ll i = k1-1; i < k2; i++)
sum_k+=a[i];
ld av = sum/n;
ld av_s;
ld sum_s = 0;
ll s1,s2;
cin >> s1 >> s2;
for(ll i = s1-1;i < s2; i++)
sum_s += a[i];
av_s = sum_s/(s2-s1 + 1);
cout << "a) " << sum << "\n";</strong>
cout << "б) " << prod << "\n";</strong>
cout << "в) " << sumkv << "\n";</strong>
cout << "г) " << sum6 << "\n";</strong>
cout << "д) " << sum_k << "\n";</strong>
cout << "е) " << av << "\n";</strong>
cout << "ж) " << av_s << "\n";</strong>
}