#include <bits/stdc++.h>
const int infin = 10000000;
const long long mod = 1000000007;
using namespace std;
struct State {
  int cnt1, cnt2, cur;
  State(int cnt1, int cnt2, int cur) : cnt1(cnt1), cnt2(cnt2), cur(cur){};
  bool operator<(const State& st) const {
    if (cnt1 != st.cnt1) return cnt1 < st.cnt1;
    if (cnt2 != st.cnt2) return cnt2 < st.cnt2;
    return cur < st.cur;
  }
};
set<pair<pair<int, long long>, State> > s;
map<State, pair<int, long long> > dp;
long long C[146][146];
void prec() {
  C[0][0] = 1;
  for (int i = 1; i < 100; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++)
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % mod;
  }
}
int main() {
  prec();
  int n, k;
  scanf("%d%d", &n, &k);
  k /= 50;
  int cnt1 = 0;
  int cnt2 = 0;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    if (x == 50)
      cnt1++;
    else
      cnt2++;
  }
  for (int i = 0; i <= cnt1; i++)
    for (int j = 0; j <= cnt2; j++)
      for (int k = 0; k < 2; k++) dp[State(i, j, k)] = make_pair(infin, 0);
  dp[State(cnt1, cnt2, 0)] = make_pair(0, 1);
  for (int i = 0; i <= cnt1; i++)
    for (int j = 0; j <= cnt2; j++)
      for (int k = 0; k < 2; k++)
        s.insert(make_pair(dp[State(i, j, k)], State(i, j, k)));
  while (!s.empty()) {
    State cur = s.begin()->second;
    s.erase(s.begin());
    if (dp[cur].first == infin) break;
    int c1 = cur.cnt1;
    int c2 = cur.cnt2;
    for (int i = 0; i <= c1; i++)
      for (int j = 0; j <= c2; j++)
        if (i + j > 0 && i + 2 * j <= k) {
          State newState = State(cnt1 - c1 + i, cnt2 - c2 + j, 1 - cur.cur);
          if (dp[newState].first > dp[cur].first + 1) {
            s.erase(make_pair(dp[newState], newState));
            dp[newState] = make_pair(dp[cur].first + 1, dp[cur].second);
            dp[newState].second *= C[c1][i] % mod * C[c2][j] % mod;
            dp[newState].second %= mod;
            s.insert(make_pair(dp[newState], newState));
          } else if (dp[newState].first == dp[cur].first + 1) {
            s.erase(make_pair(dp[newState], newState));
            dp[newState].second +=
                dp[cur].second * C[c1][i] % mod * C[c2][j] % mod;
            dp[newState].second %= mod;
            s.insert(make_pair(dp[newState], newState));
          }
        }
  }
  State fin = State(cnt1, cnt2, 1);
  if (dp[fin].first == infin) dp[fin].first = -1;
  printf("%d\n%I64d\n", dp[fin].first, dp[fin].second);
}
