#include <bits/stdc++.h>
using namespace std;
const bool print = false;
const int MAXN = 111;
const long long MOD = (long long)1e9 + 7;
const int W1 = 50, W2 = 100;
int dp[2][MAXN][MAXN];
long long spo[2][MAXN][MAXN];
int odw[2][MAXN][MAXN];
int dwum[MAXN][MAXN];
void gendwum(int n0) {
  for (int n = (0); n <= (n0); n++) {
    dwum[n][0] = dwum[n][n] = 1;
    for (int k = (1); k <= (n - 1); k++) {
      dwum[n][k] = (dwum[n - 1][k] + dwum[n - 1][k - 1]) % MOD;
    }
  }
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  gendwum(110);
  int w6 = 0, w8 = 0;
  for (int i = (1); i <= (n); i++) {
    int a;
    scanf("%d", &a);
    if (a == W1)
      w6++;
    else
      w8++;
  }
  for (int i = (0); i <= (1); i++)
    for (int j = (0); j <= (w6); j++)
      for (int k = (0); k <= (w8); k++) dp[i][j][k] = MAXN * 2000;
  dp[0][0][0] = 1;
  spo[0][0][0] = 1;
  queue<pair<pair<int, int>, pair<int, int> > > Q;
  Q.emplace(make_pair(dp[0][0][0], 0), make_pair(0, 0));
  while (!Q.empty()) {
    int wart = Q.front().first.first, side = Q.front().first.second;
    int l6 = Q.front().second.first, l8 = Q.front().second.second;
    Q.pop();
    if (dp[side][l6][l8] != wart) continue;
    if (odw[side][l6][l8]) continue;
    spo[side][l6][l8] %= MOD;
    odw[side][l6][l8] = 1;
    if (side == 0) {
      for (int lp6 = (l6); lp6 <= (w6); lp6++) {
        if (lp6 * W1 - l6 * W1 > k) break;
        for (int lp8 = (l8); lp8 <= (w8); lp8++) {
          if (lp6 * W1 - l6 * W1 + lp8 * W2 - l8 * W2 > k) break;
          if (lp6 == l6 && lp8 == l8) continue;
          if (wart + 1 < dp[1][lp6][lp8]) {
            dp[1][lp6][lp8] = wart + 1,
            Q.emplace(make_pair(wart + 1, 1), make_pair(lp6, lp8));
          }
          if (wart + 1 == dp[1][lp6][lp8])
            spo[1][lp6][lp8] +=
                (((spo[0][l6][l8] * dwum[w6 - l6][lp6 - l6]) % MOD) *
                 dwum[w8 - l8][lp8 - l8]) %
                MOD;
        }
      }
    } else {
      for (int lp6 = (l6); lp6 >= (0); lp6--) {
        if (l6 * W1 - lp6 * W1 > k) break;
        for (int lp8 = (l8); lp8 >= (0); lp8--) {
          if (l6 * W1 - lp6 * W1 + l8 * W2 - lp8 * W2 > k) break;
          if (lp6 == l6 && lp8 == l8) continue;
          if (wart + 1 < dp[0][lp6][lp8]) {
            dp[0][lp6][lp8] = wart + 1;
            Q.emplace(make_pair(wart + 1, 0), make_pair(lp6, lp8));
          }
          if (wart + 1 == dp[0][lp6][lp8])
            spo[0][lp6][lp8] += (((spo[1][l6][l8] * dwum[l6][l6 - lp6]) % MOD) *
                                 dwum[l8][l8 - lp8]) %
                                MOD;
        }
      }
    }
  }
  if (dp[1][w6][w8] >= 1990 * MAXN) {
    puts("-1\n0");
    return 0;
  }
  dp[1][w6][w8]--;
  printf("%d\n%lld\n", dp[1][w6][w8], spo[1][w6][w8]);
}
