#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > st;
bool cmp(pair<int, int> A, pair<int, int> B) {
  return A.first + A.second * 2 > B.first + B.second * 2;
}
long long C[60][60];
long long g[60][60], f[60][60];
void mul(long long &a, long long b) {
  a *= b;
  a %= 1000000007;
}
int main() {
  int i, j, N, K, a, A, B, t;
  for (i = 0; i < 60; i++)
    for (j = 0; j <= i; j++) {
      if (i == 0 || j == 0)
        C[i][j] = 1;
      else
        C[i][j] = C[i - 1][j - 1] + C[i - 1][j], C[i][j] %= 1000000007;
    }
  long long ansf, ansg;
  while (scanf("%d%d", &N, &K) != EOF) {
    A = B = 0;
    for (i = 0; i < N; i++) {
      scanf("%d", &a);
      if (a == 50)
        A++;
      else
        B++;
    }
    long long oo = 1LL << 62;
    for (i = 0; i < 60; i++)
      for (j = 0; j < 60; j++) f[i][j] = oo;
    memset(g, 0, sizeof(g));
    ansf = oo;
    ansg = 0;
    f[A][B] = 0;
    g[A][B] = 1;
    st.clear();
    for (i = 0; i <= A; i++)
      for (j = 0; j <= B; j++) st.push_back(pair<int, int>(i, j));
    sort(st.begin(), st.end(), cmp);
    int M = st.size();
    int a0, b0, a1, b1, a2, b2;
    for (t = 0; t < M; t++) {
      i = st[t].first;
      j = st[t].second;
      if (f[i][j] == oo) continue;
      if (i * 50 + j * 100 <= K) {
        if (ansf > f[i][j] + 1) {
          ansf = f[i][j] + 1;
          ansg = g[i][j];
        } else if (ansf == f[i][j] + 1) {
          ansg += g[i][j];
          ansg %= 1000000007;
        }
        continue;
      }
      for (a0 = 0; a0 <= i; a0++)
        if (a0 * 50 <= K)
          for (b0 = 0; b0 <= j; b0++)
            if (a0 + b0 > 0 && a0 * 50 + b0 * 100 <= K) {
              int i1 = A - i + a0, j1 = B - j + b0;
              int tmps = a0 * 50 + b0 * 100;
              for (a1 = 0; a1 <= i1; a1++)
                if (a1 * 50 < tmps)
                  for (b1 = 0; b1 <= j1; b1++)
                    if (a1 + b1 > 0 && a1 * 50 + b1 * 100 < tmps) {
                      int a2 = i - a0 + a1, b2 = j - b0 + b1;
                      long long tmpg = g[i][j];
                      mul(tmpg, C[i][a0]);
                      mul(tmpg, C[j][b0]);
                      mul(tmpg, C[i1][a1]);
                      mul(tmpg, C[j1][b1]);
                      if (f[a2][b2] > f[i][j] + 2) {
                        f[a2][b2] = f[i][j] + 2;
                        g[a2][b2] = tmpg;
                      } else if (f[a2][b2] == f[i][j] + 2) {
                        g[a2][b2] += tmpg;
                        g[a2][b2] %= 1000000007;
                      }
                    }
            }
    }
    if (ansf == oo)
      cout << "-1" << endl;
    else
      cout << ansf << endl;
    cout << ansg << endl;
  }
}
