#include <bits/stdc++.h>
using namespace std;
template <class P, class Q>
void smin(P &a, Q b) {
  if (b < a) a = b;
}
template <class P, class Q>
void smax(P &a, Q b) {
  if (b > a) a = b;
}
template <class P, class Q>
bool in(const P &a, const Q &b) {
  return a.find(b) != a.end();
}
const int MAXN = 200, MOD = 1000000007, INF = 1000 * 1000 * 1000;
long long C[MAXN][MAXN], ways[MAXN][MAXN][MAXN];
int n, lim, A, B;
bool ok[MAXN][MAXN][MAXN];
void update(int a1, int b1, int k, int a2, int b2) {
  ok[a2][b2][k + 1] |= ok[a1][b1][k];
  if (k % 2 == 0)
    ways[a2][b2][k + 1] +=
        1LL * C[a1][a2] * C[b1][b2] % MOD * ways[a1][b1][k] % MOD;
  else
    ways[a2][b2][k + 1] += 1LL * C[A - a1][a2 - a1] * C[B - b1][b2 - b1] % MOD *
                           ways[a1][b1][k] % MOD;
  ways[a2][b2][k + 1] %= MOD;
}
int main() {
  for (int i = (0); i < int(MAXN); ++i)
    for (int j = (0); j < int(i + 1); ++j)
      if (j == i || j == 0)
        C[i][j] = 1;
      else
        C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;
  cin >> n >> lim;
  lim /= 50;
  for (int i = (0); i < int(n); ++i) {
    int x;
    cin >> x;
    if (x == 50)
      A++;
    else if (x == 100)
      B++;
  }
  ways[A][B][0] = 1;
  ok[A][B][0] = true;
  for (int k = (0); k < int(MAXN); ++k)
    for (int a = (0); a < int(A + 1); ++a)
      for (int b = (0); b < int(B + 1); ++b) {
        if (!ok[a][b][k]) continue;
        if (k % 2 == 0) {
          for (int i = (0); i < int(a + 1); ++i)
            for (int j = (0); j < int(b + 1); ++j)
              if (i + j && i + 2 * j <= lim) update(a, b, k, a - i, b - j);
        } else if (k % 2 == 1) {
          for (int i = (0); i < int(A - a + 1); ++i)
            for (int j = (0); j < int(B - b + 1); ++j)
              if (i + j && i + 2 * j <= lim) update(a, b, k, a + i, b + j);
        }
      }
  for (int k = (0); k < int(MAXN); ++k)
    if (k % 2 && ok[0][0][k]) {
      cout << k << endl << ways[0][0][k] << endl;
      return 0;
    }
  cout << -1 << endl << 0 << endl;
  return 0;
}
