#include <bits/stdc++.h>
using namespace std;
const int size = 111222;
int mod = 1000000007;
int n, k, a, b;
long long dp[51][51][2], len[51][51][2];
long long jc[51], ni[51];
queue<int> Q;
long long mul(long long a, int k) {
  long long ans = 1;
  while (k) {
    if (k & 1) ans = ans * a % mod;
    a = a * a % mod;
    k >>= 1;
  }
  return ans;
}
long long get(int n, int m) { return jc[n] * ni[m] % mod * ni[n - m] % mod; }
int main() {
  jc[0] = ni[0] = 1;
  for (int i = 1; i < 51; i++) {
    jc[i] = jc[i - 1] * i % mod;
    ni[i] = mul(jc[i], mod - 2);
  }
  cin >> n >> k;
  k /= 50;
  memset(len, -1, sizeof(len));
  while (n--) {
    int x;
    scanf("%d", &x);
    if (x == 50)
      a++;
    else
      b++;
  }
  if (k == 0 || (k == 1 && (b > 0 || a > 1))) {
    printf("-1\n0\n");
    return 0;
  }
  dp[a][b][0] = 1;
  len[a][b][0] = 0;
  Q.push(a);
  Q.push(b);
  Q.push(0);
  while (Q.size()) {
    int na = Q.front();
    Q.pop();
    int nb = Q.front();
    Q.pop();
    int p = Q.front();
    Q.pop();
    for (int i = 0; i <= na; i++)
      for (int j = 0; j <= nb; j++)
        if (i + j > 0 && i + 2 * j <= k) {
          int nna = na - i;
          int nnb = nb - j;
          nna = a - nna;
          nnb = b - nnb;
          if (len[nna][nnb][p ^ 1] != -1 &&
              len[nna][nnb][p ^ 1] <= len[na][nb][p])
            continue;
          if (len[nna][nnb][p ^ 1] == -1) {
            Q.push(nna);
            Q.push(nnb);
            Q.push(p ^ 1);
            len[nna][nnb][p ^ 1] = len[na][nb][p] + 1;
          }
          long long tmp = dp[na][nb][p] * get(na, i) % mod * get(nb, j) % mod;
          dp[nna][nnb][p ^ 1] = (dp[nna][nnb][p ^ 1] + tmp) % mod;
        }
  }
  if (len[a][b][1] != -1) {
    cout << len[a][b][1] << endl << dp[a][b][1] << endl;
  } else
    cout << -1 << endl << 0 << endl;
}
