#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
inline long long int modi(long long int a) { return a % mod; }
const int N = 60;
int wei[N], g[N][N][2], k, n50 = 0, n100 = 0, n;
long long int bins[N][N], side0[N][N][2], side1[N][N][2];
int bfs() {
  queue<pair<int, pair<int, bool> > > q;
  g[n50][n100][0] = 0;
  q.push(make_pair(n50, make_pair(n100, false)));
  while (!q.empty()) {
    pair<int, pair<int, bool> > aux = q.front();
    q.pop();
    if (aux.first == 0 && aux.second.first == 0)
      return g[aux.first][aux.second.first][aux.second.second];
    if (aux.second.second == 0) {
      for (int i50 = 0; i50 <= aux.first && i50 <= k; i50++)
        for (int i100 = 0; i100 <= aux.second.first && i50 + 2 * i100 <= k;
             i100++)
          if ((i50 || i100) &&
              g[aux.first - i50][aux.second.first - i100][1] == -1) {
            g[aux.first - i50][aux.second.first - i100][1] =
                g[aux.first][aux.second.first][aux.second.second] + 1;
            q.push(make_pair(aux.first - i50,
                             make_pair(aux.second.first - i100, true)));
          }
    } else {
      for (int i50 = 0; i50 <= n50 - aux.first && i50 <= k; i50++)
        for (int i100 = 0; i100 <= n100 - aux.second.first && i100 <= k; i100++)
          if ((i50 || i100) &&
              g[aux.first + i50][aux.second.first + i100][0] == -1) {
            g[aux.first + i50][aux.second.first + i100][0] =
                g[aux.first][aux.second.first][aux.second.second] + 1;
            q.push(make_pair(aux.first + i50,
                             make_pair(aux.second.first + i100, false)));
          }
    }
  }
  return -1;
}
long long int bin(int i, int j) {
  if (i < 0 || j > i || j < 0) return 0;
  if (j == 0) return 1;
  if (bins[i][j] != -1) return bins[i][j];
  bins[i][j] = modi(bin(i - 1, j) + bin(i - 1, j - 1));
  return bins[i][j];
}
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &wei[i]);
    if (wei[i] == 50)
      n50++;
    else
      n100++;
  }
  k /= 50;
  memset(bins, -1, sizeof(bins));
  memset(g, -1, sizeof(g));
  int crosses = bfs();
  if (crosses < 0)
    printf("-1\n0\n");
  else {
    printf("%d\n", crosses);
    side0[0][0][0] = 1;
    side1[0][0][0] = 1;
    for (int i = 1; i <= crosses; i++) {
      for (int q50 = 0; q50 <= n50; q50++) {
        for (int q100 = 0; q100 <= n100; q100++) {
          side0[q50][q100][min(i % 2, 1)] = 0;
          side1[q50][q100][min(i % 2, 1)] = 0;
          for (int i50 = 0; i50 <= q50 && i50 <= k; i50++)
            for (int i100 = 0; i100 <= q100 && i50 + 2 * i100 <= k; i100++)
              if (i50 || i100) {
                side0[q50][q100][min(i % 2, 1)] +=
                    modi(bin(q50, i50) *
                         modi(bin(q100, i100) *
                              side1[q50 - i50][q100 - i100][!(min(i % 2, 1))]));
              }
          for (int i50 = 0; i50 <= n50 - q50 && i50 <= k; i50++)
            for (int i100 = 0; i100 <= n100 - q100 && i50 + 2 * i100 <= k;
                 i100++)
              if (i50 || i100)
                side1[q50][q100][min(i % 2, 1)] +=
                    modi(bin(n50 - q50, i50) *
                         modi(bin(n100 - q100, i100) *
                              side0[q50 + i50][q100 + i100][!(min(i % 2, 1))]));
          side0[q50][q100][min(i % 2, 1)] %= mod;
          side1[q50][q100][min(i % 2, 1)] %= mod;
        }
      }
    }
    printf("%lld\n", side0[n50][n100][min(crosses % 2, 1)]);
  }
  return 0;
}
