#include <bits/stdc++.h>
using namespace std;
const int N = 55, INF = 1000000000, mod = 1000000007;
struct state {
  int where, cant5, cant10;
  state() {}
  state(int _where, int _cant5, int _cant10) {
    where = _where;
    cant5 = _cant5;
    cant10 = _cant10;
  }
};
int n, d[2][N][N], f[2][N][N], c[N][N];
int main() {
  c[0][0] = 1;
  for (int i = 1; i < N; ++i) {
    c[i][0] = 1;
    for (int k = 1; k <= i; ++k)
      c[i][k] = (c[i - 1][k] + c[i - 1][k - 1]) % mod;
  }
  int n, k, lim5 = 0, lim10 = 0, x;
  scanf("%d %d", &n, &k);
  k /= 50;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &x);
    if (x == 50)
      lim5++;
    else
      lim10++;
  }
  queue<state> q;
  q.push(state(0, lim5, lim10));
  for (int i = 0; i <= lim5; i++)
    for (int j = 0; j <= lim10; ++j) d[0][i][j] = d[1][i][j] = INF;
  d[0][lim5][lim10] = 0;
  f[0][lim5][lim10] = 1;
  while (!q.empty()) {
    state u = q.front();
    q.pop();
    int where = u.where, cant5 = u.cant5, cant10 = u.cant10;
    int other5 = lim5 - cant5, other10 = lim10 - cant10;
    int dist = d[where][cant5][cant10];
    int formas = f[where][cant5][cant10];
    for (int i = 0; i <= cant5; ++i)
      for (int j = 0; j <= cant10; j++)
        if (i + j > 0 && i + j + j <= k)
          if (1 + dist <= d[!where][other5 + i][other10 + j]) {
            if (1 + dist < d[!where][other5 + i][other10 + j]) {
              d[!where][other5 + i][other10 + j] = 1 + dist;
              q.push(state(!where, other5 + i, other10 + j));
            }
            long long aux =
                ((long long)formas * c[cant5][i] % mod) * c[cant10][j];
            aux %= mod;
            f[!where][other5 + i][other10 + j] += aux;
            if (f[!where][other5 + i][other10 + j] >= mod)
              f[!where][other5 + i][other10 + j] -= mod;
          }
  }
  int res = d[1][lim5][lim10];
  if (res >= INF) res = -1;
  cout << res << endl;
  cout << f[1][lim5][lim10] << endl;
  return 0;
}
