#include <bits/stdc++.h>
using namespace std;
const int maxn = 50 + 10;
const int mod = 1000000000 + 7;
int n, m, num[2];
int c[maxn][maxn], w[maxn];
int f[maxn][maxn], d[maxn][maxn];
bool mark[2][maxn][maxn];
void prework() {
  memset(c, 0, sizeof(c));
  c[0][0] = 1;
  c[1][0] = c[1][1] = 1;
  for (int i = 2; i != maxn; i++) {
    c[i][0] = c[i][i] = 1;
    for (int j = 1; j != i; j++)
      c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % mod;
  }
}
int calc(long long a, long long b, long long c) {
  return ((a * b) % mod * c) % mod;
}
int main() {
  prework();
  while (scanf("%d%d", &n, &m) != EOF) {
    m = m / 50;
    num[0] = num[1] = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &w[i]);
      w[i] /= 50;
      ++num[w[i] - 1];
    }
    memset(mark, 0, sizeof(mark));
    memset(f, -1, sizeof(f));
    f[num[0]][num[1]] = 1;
    int od = 1, nx, ny;
    bool ans = false, kb = true;
    for (int t = 1; kb; t++) {
      od = 1 - od;
      kb = false;
      memset(d, -1, sizeof(d));
      for (int n0 = 0; n0 <= num[0]; n0++)
        for (int n1 = 0; n1 <= num[1]; n1++)
          if (!mark[od][n0][n1] && f[n0][n1] >= 0) {
            kb = true;
            mark[od][n0][n1] = true;
            for (int p = 0; p <= n0; p++)
              if (p <= m)
                for (int q = 0; q <= n1; q++)
                  if (p + q * 2 <= m && p + q >= 1) {
                    nx = num[0] - n0 + p;
                    ny = num[1] - n1 + q;
                    if (d[nx][ny] < 0)
                      d[nx][ny] = calc(f[n0][n1], c[n0][p], c[n1][q]);
                    else
                      d[nx][ny] =
                          (d[nx][ny] + calc(f[n0][n1], c[n0][p], c[n1][q])) %
                          mod;
                  }
          }
      if (od == 0 && d[num[0]][num[1]] >= 0) {
        ans = true;
        printf("%d\n", t);
        printf("%d\n", d[num[0]][num[1]]);
        break;
      } else if (od == 1 && d[0][0] >= 0) {
        ans = true;
        printf("%d\n", t);
        printf("%d\n", d[0][0]);
        break;
      }
      for (int i = 0; i <= num[0]; i++)
        for (int j = 0; j <= num[1]; j++) f[i][j] = d[i][j];
    }
    if (!ans) printf("-1\n0\n");
  }
  return 0;
}
