#include <bits/stdc++.h>
using namespace std;
struct state {
  int a, b, p;
};
const int mx = 55;
const long long int mod = 1e9 + 7;
int d[mx][mx][2];
long long int cmb[mx][mx];
int k, ai, bi;
long long int f[mx][mx][2];
long long int dfs(int a, int b, int p) {
  long long int &fi = f[a][b][p];
  if (fi != -1) {
    return fi;
  }
  fi = 0;
  int ca = ai - a, cb = bi - b;
  for (int x = 0; x <= a && x * 50 <= k; x++)
    for (int y = 0; y <= b && x * 50 + y * 100 <= k; y++)
      if (x + y > 0) {
        int na = ca + x, nb = cb + y, np = (p ^ 1);
        if (d[na][nb][np] == -1 + d[a][b][p]) {
          fi += cmb[a][x] * cmb[b][y] % mod * dfs(na, nb, np) % mod;
        }
      }
  fi %= mod;
  return fi;
}
int main() {
  cmb[0][0] = 1;
  for (int i = 1; i < mx; i++) {
    cmb[i][0] = cmb[i][i] = 1;
    for (int j = 1; j < i; j++) {
      cmb[i][j] = cmb[i - 1][j] + cmb[i - 1][j - 1];
      if (cmb[i][j] >= mod) cmb[i][j] -= mod;
    }
  }
  int n;
  scanf("%d %d", &n, &k);
  int a = 0, b = 0;
  for (int i = 0; i < n; i++) {
    int v;
    scanf("%d", &v);
    if (v == 50)
      a++;
    else
      b++;
  }
  ai = a, bi = b;
  queue<state> q;
  q.push({a, b, 1});
  memset(d, -1, sizeof d);
  d[a][b][1] = 0;
  while (!q.empty()) {
    state u = q.front();
    q.pop();
    int ca = a - u.a, cb = b - u.b;
    for (int x = 0; x <= u.a && x * 50 <= k; x++)
      for (int y = 0; y <= u.b && x * 50 + y * 100 <= k; y++)
        if (x + y > 0) {
          int na = ca + x, nb = cb + y, np = (u.p ^ 1);
          if (d[na][nb][np] == -1) {
            d[na][nb][np] = 1 + d[u.a][u.b][u.p];
            q.push({na, nb, np});
          }
        }
  }
  long long int ways = 0ll;
  printf("%d\n", d[a][b][0]);
  if (d[a][b][0] != -1) {
    memset(f, -1ll, sizeof f);
    f[a][b][1] = 1ll;
    ways = dfs(a, b, 0);
  }
  printf("%lld\n", ways);
  return 0;
}
