#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 10, Maxn = 50 + 10, lg = 21;
const long long inf = 1e18 + 10;
const long long mod = 1e9 + 7;
long long c5, c1, fact[Maxn], dp[Maxn][Maxn][2];
long long h[Maxn][Maxn][2];
bool mark[Maxn][Maxn][2];
bool mrk[Maxn][Maxn][2];
long long bpw(long long a, long long b) {
  if (b == 1) return a;
  if (b == 0) return 1;
  long long x = bpw(a, b / 2);
  x = (x * x) % mod;
  if (b & 1) x = (x * a) % mod;
  return x;
}
long long C(long long n, long long k) {
  if (n == k) return 1;
  if (n == 0) return 1;
  if (k == 0) return 1;
  long long x = fact[n];
  long long y = (fact[n - k] * fact[k]) % mod;
  x = (x * bpw(y, mod - 2)) % mod;
  return x;
}
int32_t main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  fact[0] = 1;
  for (long long i = 1; i < Maxn; i++) fact[i] = (fact[i - 1] * i) % mod;
  long long n, k;
  cin >> n >> k;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    if (x == 50)
      c5++;
    else
      c1++;
  }
  queue<pair<bool, pair<long long, long long>>> q;
  q.push({0, {c5, c1}});
  dp[c5][c1][0] = 1;
  mark[c5][c1][0] = 1;
  while (!q.empty()) {
    bool v = q.front().first;
    long long i = q.front().second.first, j = q.front().second.second;
    q.pop();
    if (v == 0) {
      for (long long z = 0; z <= i; z++) {
        for (long long l = 0; l <= j; l++) {
          if (l == 0 && z == 0) continue;
          if (z * 50 + l * 100 > k) continue;
          if (!mark[i - z][j - l][1 - v]) {
            mark[i - z][j - l][1 - v] = 1;
            q.push({1 - v, {i - z, j - l}});
            h[i - z][j - l][1 - v] = h[i][j][v] + 1;
            long long val = (dp[i][j][0] * C(i, z) * C(j, l)) % mod;
            dp[i - z][j - l][1] = (dp[i - z][j - l][1] + val) % mod;
          } else if (h[i - z][j - l][1 - v] == h[i][j][v] + 1) {
            long long val = (dp[i][j][0] * C(i, z) * C(j, l)) % mod;
            dp[i - z][j - l][1] = (dp[i - z][j - l][1] + val) % mod;
          }
        }
      }
    } else {
      for (long long z = 0; z <= c5 - i; z++) {
        for (long long l = 0; l <= c1 - j; l++) {
          if (z == 0 && l == 0) continue;
          if (z * 50 + l * 100 > k) continue;
          if (!mark[i + z][j + l][1 - v]) {
            mark[i + z][j + l][1 - v] = 1;
            q.push({1 - v, {i + z, j + l}});
            h[i + z][j + l][1 - v] = h[i][j][v] + 1;
            long long val = (dp[i][j][1] * C(c5 - i, z) * C(c1 - j, l)) % mod;
            dp[i + z][j + l][0] = (dp[i + z][j + l][0] + val) % mod;
          } else if (h[i + z][j + l][1 - v] == h[i][j][v] + 1) {
            long long val = (dp[i][j][1] * C(c5 - i, z) * C(c1 - j, l)) % mod;
            dp[i + z][j + l][0] = (dp[i + z][j + l][0] + val) % mod;
          }
        }
      }
    }
  }
  if (h[0][0][1] == 0) return cout << -1 << "\n" << 0 << "\n", 0;
  cout << h[0][0][1] << "\n";
  cout << dp[0][0][1] << "\n";
  return 0;
}
