#include <bits/stdc++.h>
using namespace std;
vector<int> C;
int main(void) {
  int N, P, Q, i, x;
  long long ans = 0, gen = 0, de = 0;
  scanf("%d %d %d", &N, &P, &Q);
  for (i = 0; i < N; i++) {
    scanf("%d", &x);
    x += i * P;
    C.push_back(x);
  }
  sort(C.begin(), C.end(), greater<int>());
  gen = P * N * (Q + N - 1);
  ans = gen;
  for (i = 0; i < N; i++) {
    gen += C[i] - (2 * P * (N - 1 - i)) - P * Q;
    if (ans < gen) {
      ans = gen;
      de = i + 1;
    }
  }
  ans -= P * (N - 1) * N / 2;
  printf("%lld\n", ans);
  printf("%d\n", de);
}
