#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int N = 55;
const int mod = 1e9 + 7;
int n, k, w[N], c1, c2;
int dp[N][N][2], vis[N][N][2];
int ways[N][N][2];
long long powmod(long long base, long long exp) {
  long long res = 1;
  while (exp) {
    if (exp & 1) res = res * base % mod;
    base = base * base % mod;
    exp >>= 1;
  }
  return res;
}
long long fact[N], inv[N];
long long ncr(long long n, long long r) {
  return fact[n] * inv[r] % mod * inv[n - r] % mod;
}
long long solve(int t1, int t2, int loc) {
  int& res = dp[t1][t2][loc];
  if (t1 == 0 && t2 == 0 && loc == 1) {
    return res = 0;
  }
  int o1 = c1 - t1, o2 = c2 - t2, e1, e2;
  int sgn = (loc == 0) ? 1 : -1;
  if (vis[t1][t2][loc]) return inf;
  if (res != -1) return res;
  vis[t1][t2][loc] = 1;
  res = inf;
  if (loc == 0) {
    e1 = t1;
    e2 = t2;
  } else {
    e1 = o1;
    e2 = o2;
  }
  for (int x = 0; x < 2; x++) {
    for (int i = 0; i <= e1; i++) {
      for (int j = 0; j <= e2; j++) {
        if (i + j == 0) continue;
        if (i * 50 + j * 100 > k) continue;
        int new_val = 1 + solve(t1 - i * sgn, t2 - j * sgn, loc ^ 1);
        if (new_val < res) {
          res = new_val;
        }
      }
    }
  }
  res = min(res, inf);
  vis[t1][t2][loc] = 0;
  return res;
}
long long solve_ways(int t1, int t2, int loc) {
  int& wy = ways[t1][t2][loc];
  if (t1 == 0 && t2 == 0 && loc == 1) {
    return wy = 1;
  }
  int o1 = c1 - t1, o2 = c2 - t2, e1, e2;
  int sgn = (loc == 0) ? 1 : -1;
  if (wy != -1) return wy;
  wy = 0;
  if (loc == 0) {
    e1 = t1;
    e2 = t2;
  } else {
    e1 = o1;
    e2 = o2;
  }
  for (int i = 0; i <= e1; i++) {
    for (int j = 0; j <= e2; j++) {
      if (i + j == 0) continue;
      if (i * 50 + j * 100 > k) continue;
      int new_val = 1 + solve(t1 - i * sgn, t2 - j * sgn, loc ^ 1);
      if (new_val == dp[t1][t2][loc]) {
        wy = (wy + 1ll * ncr(e1, i) % mod * ncr(e2, j) % mod *
                       solve_ways(t1 - i * sgn, t2 - j * sgn, loc ^ 1) % mod) %
             mod;
      }
    }
  }
  return wy;
}
struct State {
  int t1, t2, loc, ans;
  State() {}
  State(int _t1, int _t2, int _loc, int _ans) {
    t1 = _t1;
    t2 = _t2;
    loc = _loc;
    ans = _ans;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  fact[0] = fact[1] = inv[0] = inv[1] = 1;
  for (int i = 2; i < N; i++) {
    fact[i] = i * 1ll * fact[i - 1] % mod;
    inv[i] = powmod(fact[i], mod - 2);
  }
  memset(dp, -1, sizeof(dp));
  memset(ways, -1, sizeof(ways));
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> w[i];
    if (w[i] == 50)
      c1++;
    else
      c2++;
  }
  queue<State> Q;
  Q.push(State(0, 0, 1, 0));
  dp[0][0][1] = 0;
  while (!Q.empty()) {
    State front = Q.front();
    Q.pop();
    int loc = front.loc, t1 = front.t1, t2 = front.t2;
    int e1 = front.t1, e2 = front.t2;
    int sgn = (loc == 0) ? 1 : -1;
    if (front.loc == 1) {
      e1 = c1 - e1;
      e2 = c2 - e2;
    }
    for (int i = 0; i <= e1; i++) {
      for (int j = 0; j <= e2; j++) {
        if (i + j == 0) continue;
        if (i * 50 + j * 100 > k) continue;
        if (dp[t1 - i * sgn][t2 - j * sgn][loc ^ 1] == -1) {
          dp[t1 - i * sgn][t2 - j * sgn][loc ^ 1] = front.ans + 1;
          Q.push(State(t1 - i * sgn, t2 - j * sgn, loc ^ 1, front.ans + 1));
        }
      }
    }
  }
  int ans = dp[c1][c2][0];
  if (ans == inf) ans = -1;
  cout << ans << endl;
  if (ans != -1)
    cout << solve_ways(c1, c2, 0) << endl;
  else
    cout << 0 << endl;
  return 0;
}
