#include <bits/stdc++.h>
using namespace std;
struct state {
  int a, b, s;
  state(int _a, int _b, int _s) : a(_a), b(_b), s(_s) {}
};
long long w[50][50][2], f[50][50][2], C[51][51];
int n, k, na, nb;
void read() {
  int m;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> m;
    if (m == 50)
      na++;
    else
      nb++;
  }
  memset(C, 0, sizeof(C));
  C[0][0] = 1;
  for (int i = 1; i <= 50; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++) {
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % 1000000007;
    }
  }
  memset(w, 0, sizeof(w));
  memset(f, 0xff, sizeof(f));
  w[na][nb][0] = 1;
  f[na][nb][0] = 0;
}
void solve() {
  queue<state> Q;
  Q.push(state(na, nb, 0));
  while (!Q.empty()) {
    int a = Q.front().a, b = Q.front().b, s = Q.front().s;
    Q.pop();
    for (int i = 0; i <= a; i++) {
      for (int j = 0; j <= b; j++) {
        if (i + j == 0 || i * 50 + j * 100 > k) continue;
        if (f[na - a + i][nb - b + j][!s] == -1) {
          f[na - a + i][nb - b + j][!s] = f[a][b][s] + 1;
          w[na - a + i][nb - b + j][!s] +=
              ((w[a][b][s] * C[a][i]) % 1000000007 * C[b][j]) % 1000000007;
          w[na - a + i][nb - b + j][!s] %= 1000000007;
          Q.push(state(na - a + i, nb - b + j, !s));
        } else if (f[na - a + i][nb - b + j][!s] == f[a][b][s] + 1) {
          w[na - a + i][nb - b + j][!s] +=
              ((w[a][b][s] * C[a][i]) % 1000000007 * C[b][j]) % 1000000007;
          w[na - a + i][nb - b + j][!s] %= 1000000007;
        }
      }
    }
  }
  cout << f[na][nb][1] << endl << w[na][nb][1] << endl;
}
int main() {
  read();
  solve();
}
