#include <bits/stdc++.h>
using namespace std;
const int N = 55, mod = 1e9 + 7;
struct data {
  int n5, n1, nw;
};
int res = 0, cnt = 0;
int vis[N][N][2];
long long f[N][N][2], yh[N][N];
queue<data> q;
void Add(long long &x, long long y) { x = (x + y) % mod; }
long long add(long long x, long long y) { return (x + y) % mod; }
long long mul(long long x, long long y) { return (x * y) % mod; }
void init() {
  for (int i = 0; i <= 50; ++i) yh[i][i] = yh[i][0] = 1;
  for (int i = 1; i <= 50; ++i)
    for (int j = 1; j <= i - 1; ++j)
      yh[i][j] = add(yh[i - 1][j - 1], yh[i - 1][j]);
}
int main() {
  init();
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    if (x == 50)
      res++;
    else
      cnt++;
  }
  memset(f, 0, sizeof f);
  memset(vis, -1, sizeof vis);
  vis[res][cnt][0] = 0, f[res][cnt][0] = 1;
  q.push((data){res, cnt, 0});
  while (!q.empty()) {
    data h = q.front();
    q.pop();
    int nc = vis[h.n5][h.n1][h.nw] + 1;
    if (!h.n5 && !h.n1) break;
    if (h.nw) {
      int kk = res - h.n5, tt = cnt - h.n1;
      for (int i = 0; i <= kk; ++i) {
        int yu = k - 50 * i;
        if (yu < 0) break;
        int pos = min(tt, yu / 100);
        for (int j = 0; j <= pos; ++j) {
          if (!i && !j) continue;
          int w5 = h.n5 + i, w1 = h.n1 + j;
          if (vis[w5][w1][0] != -1 && vis[w5][w1][0] < nc) continue;
          long long tmp = mul(yh[kk][i], yh[tt][j]);
          Add(f[w5][w1][0], mul(tmp, f[h.n5][h.n1][1]));
          if (vis[w5][w1][0] == -1) q.push((data){w5, w1, 0});
          vis[w5][w1][0] = nc;
        }
      }
    } else {
      for (int i = 0; i <= h.n5; ++i) {
        int yu = k - 50 * i;
        if (yu < 0) break;
        int pos = min(h.n1, yu / 100);
        for (int j = 0; j <= pos; ++j) {
          if (!i && !j) continue;
          int w5 = h.n5 - i, w1 = h.n1 - j;
          if (vis[w5][w1][1] != -1 && vis[w5][w1][1] < nc) continue;
          long long tmp = mul(yh[h.n5][i], yh[h.n1][j]);
          Add(f[w5][w1][1], mul(f[h.n5][h.n1][0], tmp));
          if (vis[w5][w1][1] == -1) q.push((data){w5, w1, 1});
          vis[w5][w1][1] = nc;
        }
      }
    }
  }
  if (vis[0][0][1] == -1)
    printf("-1\n0\n");
  else
    printf("%d\n%lld\n", vis[0][0][1], f[0][0][1]);
  return 0;
}
