#include <bits/stdc++.h>
using namespace std;
const int nmax = 52, inf = int(1e9), mod = int(1e9) + 7;
int n, K;
int dp[2][nmax][nmax], ways[2][nmax][nmax];
int comb[nmax][nmax];
int t[2];
int main() {
  cin >> n >> K;
  int w;
  for (int i = 0; i < (int)n; ++i) {
    cin >> w;
    t[w != 50]++;
  }
  for (int k = 0; k < (int)2; ++k) {
    for (int i = 0; i < (int)nmax; ++i) {
      for (int j = 0; j < (int)nmax; ++j) {
        dp[k][i][j] = inf;
      }
    }
  }
  comb[0][0] = 1;
  for (int i = 1; i < nmax; i++) {
    comb[i][0] = comb[i][i] = 1;
    for (int j = 1; j < i; ++j) {
      comb[i][j] = (comb[i - 1][j] + comb[i - 1][j - 1]) % mod;
    }
  }
  dp[0][0][0] = 0;
  ways[0][0][0] = 1;
  int side = 0;
  for (int moves = 1;; moves++, side ^= 1) {
    int cSide = side ^ 1;
    if (moves == 1) {
      for (int i = 0; i <= t[0]; ++i) {
        for (int j = 0; j <= t[1]; ++j) {
          if ((i > 0 || j > 0) && i * 50 + j * 100 <= K) {
            dp[cSide][i][j] = 1;
            ways[cSide][i][j] = 1ll * comb[t[0]][i] * comb[t[1]][j] % mod;
          }
        }
      }
      continue;
    }
    bool ok = false;
    for (int i = 0; i <= t[0]; ++i) {
      for (int j = 0; j <= t[1]; ++j) {
        if ((!i && !j) || (i == t[0] && j == t[1]) || dp[side][i][j] == inf)
          continue;
        int oi = t[0] - i;
        int oj = t[1] - j;
        for (int k = 0; k <= i; ++k) {
          for (int w = 0; w <= j; ++w) {
            if (k + w > 0 && k * 50 + w * 100 <= K) {
              if (dp[cSide][oi + k][oj + w] > moves) {
                dp[cSide][oi + k][oj + w] = moves;
                ways[cSide][oi + k][oj + w] =
                    (1ll * ways[side][i][j] * comb[i][k] % mod) * 1ll *
                    comb[j][w] % mod;
                ok = true;
              } else if (dp[cSide][oi + k][oj + w] == moves) {
                ways[cSide][oi + k][oj + w] +=
                    (1ll * ways[side][i][j] * comb[i][k] % mod) * 1ll *
                    comb[j][w] % mod;
                ways[cSide][oi + k][oj + w] %= mod;
              }
            }
          }
        }
      }
    }
    if (!ok) break;
  }
  if (dp[1][t[0]][t[1]] == inf) {
    cout << "-1\n0";
  } else {
    cout << dp[1][t[0]][t[1]] << "\n" << ways[1][t[0]][t[1]];
  }
  return 0;
}
