#include <bits/stdc++.h>
using namespace std;
long long Set(long long N, long long pos) { return N = N | (1ll << pos); }
long long reset(long long N, long long pos) { return N = N & ~(1ll << pos); }
bool check(long long N, long long pos) { return (bool)(N & (1ll << pos)); }
void CI(long long &_x) { scanf("%d", &_x); }
void CO(long long &_x) { cout << _x; }
template <typename T>
void getarray(T a[], long long n) {
  for (long long i = 0; i < n; i++) cin >> a[i];
}
template <typename T>
void prLLIarray(T a[], long long n) {
  for (long long i = 0; i < n - 1; i++) cout << a[i] << " ";
  cout << a[n - 1] << endl;
}
const double EPS = 1e-9;
const long long INF = 0x7f7f7f7f;
long long dr8[8] = {1, -1, 0, 0, 1, -1, -1, 1};
long long dc8[8] = {0, 0, -1, 1, 1, 1, -1, -1};
long long dr4[4] = {0, 0, 1, -1};
long long dc4[4] = {-1, 1, 0, 0};
long long kn8r[8] = {1, 2, 2, 1, -1, -2, -2, -1};
long long kn8c[8] = {2, 1, -1, -2, -2, -1, 1, 2};
int n, fifty, hundred, capacity;
void input() {
  cin >> n;
  cin >> capacity;
  for (long long i = 1; i <= n; i++) {
    int temp;
    cin >> temp;
    if (temp == 50)
      fifty++;
    else
      hundred++;
  }
}
struct sumit {
  int f_50, f_100, side;
  sumit() {}
  sumit(int f_50, int f_100, int side) : f_50(f_50), f_100(f_100), side(side) {}
};
int dis[50][50][2];
void bfs() {
  memset(dis, -1, sizeof dis);
  dis[fifty][hundred][0] = 0;
  queue<sumit> Q;
  Q.push(sumit(fifty, hundred, 0));
  while (!Q.empty()) {
    sumit top = Q.front();
    Q.pop();
    int u_50 = top.f_50, u_100 = top.f_100, u_side = top.side;
    int u_d = dis[u_50][u_100][u_side];
    for (int i = 0; i <= u_50; i++)
      for (int j = 0; j <= u_100; j++) {
        if (i == 0 && j == 0) continue;
        if ((i * 50) + (j * 100) > capacity) continue;
        int v_50 = fifty - u_50 + i;
        int v_100 = hundred - u_100 + j;
        int v_side = u_side ^ 1;
        if (dis[v_50][v_100][v_side] != -1) continue;
        dis[v_50][v_100][v_side] = 1 + u_d;
        Q.push(sumit(v_50, v_100, v_side));
      }
  }
}
long long mod = (1e9) + 7;
long long mem[55][55];
long long nCr(int n, int r) {
  if (r == 1) return n;
  if (n == r) return 1;
  if (r == 0) return 1;
  if (r > n) return 0;
  if (mem[n][r] != -1) return mem[n][r];
  return mem[n][r] = (nCr(n - 1, r) + nCr(n - 1, r - 1)) % mod;
}
long long dp[55][55][2];
long long rec(int f_50, int f_100, int side) {
  if (f_50 == fifty && f_100 == hundred && side == 0) return 1;
  int d = dis[f_50][f_100][side];
  long long &ans = dp[f_50][f_100][side];
  if (ans != -1) return ans;
  ans = 0;
  for (int i = 0; i <= f_50; i++)
    for (int j = 0; j <= f_100; j++)
      if (i + j > 0) {
        if ((i * 50) + (j * 100) > capacity) continue;
        int v_50 = fifty - f_50 + i;
        int v_100 = hundred - f_100 + j;
        if (d == 1 + dis[v_50][v_100][side ^ 1]) {
          ans += ((nCr(f_50, i) * nCr(f_100, j)) % mod *
                  rec(v_50, v_100, side ^ 1)) %
                 mod;
          ans %= mod;
        }
      }
  return ans;
}
void proc() {
  bfs();
  if (dis[fifty][hundred][1] == -1) {
    puts("-1\n0");
    return;
  }
  cout << dis[fifty][hundred][1] << "\n" << rec(fifty, hundred, 1) << "\n";
}
int main() {
  memset(dp, -1, sizeof dp);
  memset(mem, -1, sizeof mem);
  input();
  proc();
}
