#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 50 + 5, M = 6 * N + 5;
int n, k, sum, cnt[5], a[N];
struct Node {
  bool fen;
  int awl, tani;
  Node(int awl, int tani, bool fen) : awl(awl), tani(tani), fen(fen) {}
};
long long MOD(1e9 + 7);
long long nCr[N][N];
void pre() {
  nCr[0][0] = 1;
  for (int i = 1; i < N; ++i) {
    nCr[i][0] = 1;
    for (int j = 1; j < N; ++j)
      nCr[i][j] = (nCr[i - 1][j] + nCr[i - 1][j - 1]) % MOD;
  }
}
int dis[N][N][2], dp[N][N][2];
void bfs() {
  queue<Node> q;
  q.emplace(cnt[1], cnt[2], 0);
  dp[cnt[1]][cnt[2]][0] = 1;
  dis[cnt[1]][cnt[2]][0] = 1;
  while (q.size()) {
    Node top = q.front();
    q.pop();
    if (top.awl == cnt[1] && top.tani == cnt[2] && top.fen) return;
    bool fen = top.fen;
    int hna_awl = top.awl;
    int hna_tani = top.tani;
    for (int hwde_awl = 0; hwde_awl <= hna_awl; ++hwde_awl) {
      for (int hwde_tani = 0; hwde_tani <= hna_tani; ++hwde_tani) {
        if (hwde_awl + (hwde_tani * 2) > k || !(hwde_awl + hwde_tani)) continue;
        int hnak_awl = (cnt[1] - hna_awl + hwde_awl);
        int hnak_tani = (cnt[2] - hna_tani + hwde_tani);
        if (!dis[hnak_awl][hnak_tani][!fen]) {
          q.emplace(hnak_awl, hnak_tani, !fen);
          dis[hnak_awl][hnak_tani][!fen] = dis[hna_awl][hna_tani][fen] + 1;
        }
        if (dis[hnak_awl][hnak_tani][!fen] == dis[hna_awl][hna_tani][fen] + 1) {
          dp[hnak_awl][hnak_tani][!fen] =
              (dp[hnak_awl][hnak_tani][!fen] +
               (((dp[hna_awl][hna_tani][fen] * nCr[hna_awl][hwde_awl]) % MOD) *
                (nCr[hna_tani][hwde_tani])) %
                   MOD) %
              MOD;
        }
      }
    }
  }
  exit(puts("-1\n0"));
}
int main() {
  pre();
  scanf("%d%d", &n, &k);
  k /= 50;
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
    a[i] /= 50;
    sum += a[i];
    ++cnt[a[i]];
  }
  bfs();
  printf("%d\n", dis[cnt[1]][cnt[2]][1] - 1);
  printf("%lld\n", dp[cnt[1]][cnt[2]][1] % MOD);
  return 0;
}
