#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool smin(T &a, const T &b) {
  return b < a ? a = b, 1 : 0;
}
template <typename T>
inline bool smax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
const long long N = 50 + 10, mod = (long long)1e9 + 7, inf = (long long)2e9;
long long n, k, C[N][N], ar[N], small, big;
pair<long long, long long> dp[2][N][N];
deque<pair<long long, pair<long long, long long> > > dq;
inline void add(long long place, long long small, long long big) {
  dq.push_back({place, {small, big}});
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (long long i = 0; i < n; ++i) {
    cin >> ar[i];
    small += ar[i] == 50;
    big += ar[i] == 100;
  }
  for (long long i = 0; i < N; ++i) {
    C[i][0] = C[i][i] = 1;
    for (long long j = 1; j < i; ++j)
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % mod;
  }
  for (long long i = 0; i < 2; ++i)
    for (long long j = 0; j < N; ++j)
      for (long long col = 0; col < N; ++col) dp[i][j][col] = {inf, 0};
  dp[0][small][big] = {0, 1};
  add(0, small, big);
  while (!dq.empty()) {
    pair<long long, pair<long long, long long> > pi = dq.front();
    dq.pop_front();
    long long place = pi.first;
    long long sm = pi.second.first;
    long long bg = pi.second.second;
    long long lim0, lim1;
    pair<long long, long long> cur = dp[place][sm][bg];
    if (!place) {
      for (long long bring0 = 0; bring0 <= sm; ++bring0) {
        for (long long bring1 = 0; bring1 <= bg; ++bring1) {
          if (!bring1 && !bring0) continue;
          long long nsm = sm - bring0;
          long long nbg = bg - bring1;
          long long weight = bring0 * 50 + bring1 * 100;
          if (weight > k) continue;
          long long nplc = place ^ 1;
          pair<long long, long long> &nxt = dp[nplc][nsm][nbg];
          if (nxt.first < cur.first + 1) continue;
          long long ways0 = C[sm][bring0];
          long long ways1 = C[bg][bring1];
          long long all = ways0 * ways1 % mod;
          (all *= cur.second) %= mod;
          if (nxt.first == cur.first + 1) {
            (nxt.second += all) %= mod;
          } else {
            add(nplc, nsm, nbg);
            nxt.first = cur.first + 1;
            nxt.second = all;
          }
        }
      }
    } else {
      for (long long bring0 = 0; bring0 <= small - sm; ++bring0) {
        for (long long bring1 = 0; bring1 <= big - bg; ++bring1) {
          if (!bring0 && !bring1) continue;
          long long nsm = sm + bring0;
          long long nbg = bg + bring1;
          long long weight = bring0 * 50 + bring1 * 100;
          if (weight > k) continue;
          long long nplc = place ^ 1;
          pair<long long, long long> &nxt = dp[nplc][nsm][nbg];
          if (nxt.first < cur.first + 1) continue;
          long long ways0 = C[small - sm][bring0];
          long long ways1 = C[big - bg][bring1];
          long long all = ways0 * ways1 % mod;
          (all *= cur.second) %= mod;
          if (nxt.first == cur.first + 1) {
            (nxt.second += all) %= mod;
          } else {
            add(nplc, nsm, nbg);
            nxt.first = cur.first + 1;
            nxt.second = all;
          }
        }
      }
    }
  }
  if (dp[1][0][0].first == inf) dp[1][0][0].first = -1;
  cout << dp[1][0][0].first << endl << dp[1][0][0].second << endl;
}
