#include <bits/stdc++.h>
using namespace std;
FILE *in;
FILE *out;
const int MAX = 54;
const int MM = 204;
const int MOD = 1000000007;
const int INF = 1000000001;
int n, k;
int cnt1 = 0, cnt2 = 0;
int dyn[2][MAX][MAX][MM];
long long tri[MAX][MAX];
int recurse(int where, int have1, int have2, int moves) {
  if (where == 1 && have1 == cnt1 && have2 == cnt2) return 1;
  if (moves <= 0) return 0;
  if (dyn[where][have1][have2][moves] != -1)
    return dyn[where][have1][have2][moves];
  int other1 = cnt1 - have1, other2 = cnt2 - have2;
  int ans = 0;
  for (int i = 0; i <= have1; i++) {
    if (i * 1 > k) break;
    for (int c = 0; c <= have2; c++)
      if (i + c > 0) {
        if (i * 1 + c * 2 > k) break;
        ans = max(ans, recurse(!where, other1 + i, other2 + c, moves - 1));
      }
  }
  return dyn[where][have1][have2][moves] = ans;
}
int go(int where, int have1, int have2, int moves) {
  if (where == 1 && have1 == cnt1 && have2 == cnt2) return 1;
  if (moves <= 0) return 0;
  if (dyn[where][have1][have2][moves] != -1)
    return dyn[where][have1][have2][moves];
  int other1 = cnt1 - have1, other2 = cnt2 - have2;
  int ans = 0;
  for (int i = 0; i <= have1; i++) {
    if (i * 1 > k) break;
    for (int c = 0; c <= have2; c++)
      if (i + c > 0) {
        if (i * 1 + c * 2 > k) break;
        int cur = go(!where, other1 + i, other2 + c, moves - 1);
        cur = (cur * tri[have1][i]) % MOD;
        cur = (cur * tri[have2][c]) % MOD;
        ans = (ans + cur) % MOD;
      }
  }
  return dyn[where][have1][have2][moves] = ans;
}
int main(void) {
  in = stdin;
  out = stdout;
  for (int i = 0; i < MAX; i++) {
    tri[i][0] = tri[i][i] = 1;
    for (int c = 1; c < i; c++)
      tri[i][c] = (tri[i - 1][c - 1] + tri[i - 1][c]) % MOD;
  }
  fscanf(in, "%d %d", &n, &k);
  k /= 50;
  for (int i = 0; i < n; i++) {
    int tmp;
    fscanf(in, "%d", &tmp);
    if (tmp == 50)
      cnt1++;
    else
      cnt2++;
  }
  memset(dyn, -1, sizeof(dyn));
  int ans = 0;
  while (ans < MM - 1) {
    ans++;
    if (recurse(0, cnt1, cnt2, ans)) break;
  }
  if (ans >= MM - 1) {
    fprintf(out, "-1\n0\n");
    return 0;
  }
  memset(dyn, -1, sizeof(dyn));
  int ways = go(0, cnt1, cnt2, ans);
  fprintf(out, "%d\n%d\n", ans, ways);
  return 0;
}
