#include <bits/stdc++.h>
using namespace std;
int u[51][51][2];
int que[5000][3];
int pre[51][51][2][2];
long long ans[51][51][2];
int dis[51][51][2];
long long C[51][51];
const long long M = 1000000007LL;
int main() {
  int n, W, i, j, x, y, dx, dy, df, p, q, md, f, s1, s2;
  C[0][0] = 1;
  for (i = 1; i < 51; i++) {
    C[i][0] = C[i][i] = 1;
    for (j = 1; j < i; j++) {
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % M;
    }
  }
  scanf("%d %d", &n, &W);
  W /= 50;
  s1 = s2 = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    if (x == 50) {
      s1++;
    } else {
      s2++;
    }
  }
  que[0][0] = s1;
  que[0][1] = s2;
  que[0][2] = 0;
  ans[s1][s2][0] = 1;
  dis[s1][s2][0] = 0;
  md = -1;
  p = 0;
  q = -1;
  while (p != q) {
    x = que[++q][0];
    y = que[q][1];
    f = que[q][2];
    if (f == 1 && x == s1 && y == s2) {
      md = dis[s1][s2][1];
      break;
    }
    df = 1 - que[q][2];
    for (i = 0; i <= x; i++) {
      for (j = (i == 0 ? 1 : 0); j <= y; j++) {
        if (i + j * 2 <= W) {
          dx = s1 - x + i;
          dy = s2 - y + j;
          if (!u[dx][dy][df]) {
            u[dx][dy][df] = 1;
            que[++p][0] = dx;
            que[p][1] = dy;
            que[p][2] = df;
            dis[dx][dy][df] = dis[x][y][f] + 1;
            pre[dx][dy][df][0] = x;
            pre[dx][dy][df][1] = y;
          }
          if (dis[dx][dy][df] == dis[x][y][f] + 1) {
            ans[dx][dy][df] = (ans[dx][dy][df] +
                               (((ans[x][y][f] * C[x][i]) % M) * C[y][j]) % M) %
                              M;
          }
        }
      }
    }
  }
  printf("%d\n", md);
  if (md != -1) {
    cout << ans[s1][s2][1] << endl;
  } else {
    cout << 0 << endl;
  }
  return 0;
}
