#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
int n, k, v;
int a = 0, b = 0;
const long long mod = 1e9 + 7;
inline void add(long long &v1, long long v2) {
  v1 += v2;
  v1 %= mod;
}
const int MAXN = 52;
int shortest;
long long fac[MAXN], inv[MAXN];
long long powe(long long x, long long e) {
  long long res = 1;
  while (e) {
    if (e & 1) res = res * x % mod;
    e >>= 1;
    x = x * x % mod;
  }
  return res;
}
void init() {
  fac[0] = 1;
  for (int i = 1; i < MAXN; i++) fac[i] = fac[i - 1] * i % mod;
  inv[MAXN - 1] = powe(fac[MAXN - 1], mod - 2);
  for (int i = MAXN - 2; i >= 0; i--) inv[i] = inv[i + 1] * (i + 1) % mod;
}
inline long long choose(int a, int b) {
  return fac[a] * inv[a - b] % mod * inv[b] % mod;
}
long long dp[MAXN][MAXN][2];
long long dist[MAXN][MAXN][2];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  init();
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> v;
    if (v == 50)
      a++;
    else
      b++;
  }
  memset(dist, 0x3f, sizeof dp);
  queue<tuple<int, int, int> > q;
  q.push(make_tuple(a, b, 0));
  dp[a][b][0] = 1;
  int x, y, z, x2, y2, z2;
  bool ok = false;
  int steps = 0;
  while (!q.empty() && !ok) {
    for (int len = q.size(); len > 0; len--) {
      tie(x, y, z) = q.front();
      q.pop();
      x2 = a - x, y2 = b - y, z2 = !z;
      if (x == a && y == b && z == 1) {
        ok = true;
      }
      for (int i = 0; i <= x; i++) {
        int costA = i * 50;
        long long waysA = choose(x, i);
        if (costA > k) break;
        for (int j = 0; j <= y; j++) {
          if (i == 0 && j == 0) continue;
          int costB = j * 100;
          if (costA + costB > k) break;
          long long waysB = choose(y, j);
          int x3 = x2 + i, y3 = y2 + j;
          if (steps + 1 < dist[x3][y3][z2]) {
            dist[x3][y3][z2] = steps + 1;
            q.push(make_tuple(x3, y3, z2));
          }
          if (steps + 1 == dist[x3][y3][z2]) {
            add(dp[x3][y3][z2], waysA * waysB % mod * dp[x][y][z] % mod);
          }
        }
      }
    }
    steps++;
  }
  if (!ok) {
    cout << -1 << "\n" << 0;
  } else {
    cout << dist[a][b][1] << "\n" << dp[a][b][1];
  }
}
