#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
const long long MOD = 1e9 + 7;
const int MAXN = 55;
int n, k;
int DP[MAXN][MAXN][2];
int A[MAXN], x, mins;
queue<pair<pair<int, int>, int> > q;
long long tot[MAXN][MAXN][2];
long long comb[MAXN][MAXN];
long long komb(int a, int b) {
  if (a == b) return 1;
  if (b == 0) return 1;
  long long &ret = comb[a][b];
  if (ret != -1) return ret;
  return ret = (komb(a - 1, b - 1) + komb(a - 1, b)) % MOD;
}
long long rek(int a, int b, int c) {
  if (a == 0 && b == 0 && c == 1) return 1;
  long long &ret = tot[a][b][c];
  if (ret != -1) return ret;
  ret = 0;
  if (c == 0) {
    for (int i = 0; i < b + 1; i++)
      for (int j = 0; j < a - b + 1; j++) {
        if (i == 0 && j == 0) continue;
        if (i * 50 + j * 100 <= k &&
            DP[a - (i + j)][b - i][1] == DP[a][b][c] - 1) {
          ret = ret + (komb(b, i) * komb(a - b, j) % MOD *
                       rek(a - (i + j), b - i, 1) % MOD);
          ret %= MOD;
        }
      }
  } else {
    for (int i = 0; i < x - b + 1; i++)
      for (int j = 0; j < n - a - x + b + 1; j++) {
        if (i == 0 && j == 0) continue;
        if (i * 50 + j * 100 <= k &&
            DP[a + i + j][b + i][0] == DP[a][b][c] - 1) {
          ret = ret + (komb(x - b, i) * komb(n - a - x + b, j) % MOD *
                       rek(a + i + j, b + i, 0) % MOD);
          ret %= MOD;
        }
      }
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  memset(DP, -1, sizeof DP);
  memset(comb, -1, sizeof comb);
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    if (A[i] == 50) x++;
  }
  q.push(make_pair(make_pair(0, 0), 1));
  DP[0][0][1] = 0;
  while (!q.empty()) {
    pair<pair<int, int>, int> now = q.front();
    q.pop();
    int a = now.first.first, b = now.first.second, c = now.second;
    if (c == 1) {
      for (int i = 0; i < x - b + 1; i++)
        for (int j = 0; j < n - x + b - a + 1; j++) {
          if (i == 0 && j == 0) continue;
          if (i * 50 + j * 100 > k) continue;
          if (DP[a + i + j][b + i][0] != -1) continue;
          DP[a + i + j][b + i][0] =
              DP[now.first.first][now.first.second][now.second] + 1;
          q.push(make_pair(make_pair(a + i + j, b + i), 0));
        }
    } else {
      for (int i = 0; i < b + 1; i++)
        for (int j = 0; j < min(a - i, n - x) + 1; j++) {
          if (i == 0 && j == 0) continue;
          if (i * 50 + j * 100 > k) continue;
          if (DP[a - (i + j)][b - i][1] != -1) continue;
          DP[a - (i + j)][b - i][1] =
              DP[now.first.first][now.first.second][now.second] + 1;
          q.push(make_pair(make_pair(a - i - j, b - i), 1));
        }
    }
  }
  mins = DP[n][x][0];
  if (mins == -1) {
    cout << -1 << '\n' << 0 << '\n';
    return 0;
  }
  memset(tot, -1, sizeof tot);
  cout << mins << '\n';
  cout << rek(n, x, 0) << '\n';
}
