#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000LL * 1000 + 7, MAX_N = 50 + 6;
int mark[MAX_N][MAX_N][2], lvl[MAX_N][MAX_N][2];
long long dp[MAX_N][MAX_N][2], C[MAX_N][MAX_N];
int a[2];
int n, k;
int lvlSolve() {
  queue<pair<pair<int, int>, int> > Q;
  mark[0][0][1] = 1;
  Q.push(make_pair(pair<int, int>(0, 0), 1));
  while (!Q.empty()) {
    int x = Q.front().first.first, y = Q.front().first.second;
    int t = Q.front().second;
    Q.pop();
    if (t == 0) {
      for (int i = 0; i <= x && i * 50 <= k; i++)
        for (int j = 0; j <= y && j * 100 <= (k - i * 50); j++) {
          if (i == 0 && j == 0) continue;
          int v = x - i, u = y - j;
          if (!mark[v][u][1]) {
            mark[v][u][1] = 1;
            lvl[v][u][1] = lvl[x][y][0] + 1;
            Q.push(make_pair(pair<int, int>(v, u), 1));
          }
        }
    } else {
      for (int i = 0; i <= a[0] - x && i * 50 <= k; i++)
        for (int j = 0; j <= a[1] - y && j * 100 <= (k - i * 50); j++) {
          if (i == 0 && j == 0) continue;
          int v = x + i, u = y + j;
          if (!mark[v][u][0]) {
            mark[v][u][0] = 1;
            lvl[v][u][0] = lvl[x][y][1] + 1;
            Q.push(make_pair(pair<int, int>(v, u), 0));
          }
        }
    }
  }
  return mark[a[0]][a[1]][0];
}
long long mem(int x, int y, int t) {
  if (x == 0 && y == 0 && t == 1) dp[x][y][t] = 1;
  if (dp[x][y][t] != -1) return dp[x][y][t];
  dp[x][y][t] = 0;
  if (t == 0) {
    for (int i = 0; i <= x && i * 50 <= k; i++)
      for (int j = 0; j <= y && j * 100 <= (k - i * 50); j++) {
        if (i == 0 && j == 0) continue;
        int v = x - i, u = y - j;
        if (lvl[v][u][1] + 1 != lvl[x][y][0]) continue;
        long long res = (mem(v, u, 1) * ((C[x][i] * C[y][j]) % MOD) % MOD);
        dp[x][y][t] = (dp[x][y][t] + res) % MOD;
      }
  } else {
    for (int i = 0; i <= a[0] - x && i * 50 <= k; i++)
      for (int j = 0; j <= a[1] - y && j * 100 <= (k - i * 50); j++) {
        if (i == 0 && j == 0) continue;
        int v = x + i, u = y + j;
        if (lvl[v][u][0] + 1 != lvl[x][y][1]) continue;
        long long res =
            (mem(v, u, 0) * ((C[a[0] - x][i] * C[a[1] - y][j]) % MOD)) % MOD;
        dp[x][y][t] = (dp[x][y][t] + res) % MOD;
      }
  }
  return dp[x][y][t];
}
void solveWays() {
  for (int i(0); i < int(n + 1); i++)
    for (int j(0); j < int(i + 1); j++) {
      if (i == j || j == 0)
        C[i][j] = 1;
      else
        C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;
    }
  for (int i(0); i < int(n + 1); i++)
    for (int j(0); j < int(n + 1); j++)
      for (int t(0); t < int(2); t++) dp[i][j][t] = -1;
  cout << lvl[a[0]][a[1]][0] << endl;
  cout << mem(a[0], a[1], 0) << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> k;
  for (int i(0); i < int(n); i++) {
    int x;
    cin >> x;
    ++a[x / 50 - 1];
  }
  if (!lvlSolve())
    cout << -1 << '\n' << 0 << endl;
  else
    solveWays();
  return 0;
}
