#include <bits/stdc++.h>
using namespace std;
const int MAXN = 50 + 5;
const int MAXK = 5000 + 50;
const int mod = 1000 * 1000 * 1000 + 7;
const int INF = 1000 * 1000 * 1000;
int n, k;
long long A[MAXN][MAXN][2], B[MAXN][MAXN][2];
bool mark[MAXN][MAXN];
int aa, bb;
long long C[MAXN][MAXN];
int deep[MAXN][MAXN][2];
int main() {
  C[0][0] = 1;
  for (int i = 1; i < MAXN; i++) C[i][0] = 1;
  for (int i = 1; i < MAXN; i++)
    for (int j = 1; j <= i; j++) {
      C[i][j] = C[i - 1][j - 1] + C[i - 1][j];
      C[i][j] %= mod;
    }
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a == 50)
      aa++;
    else
      bb++;
  }
  deep[aa][bb][0] = 1;
  deque<pair<pair<int, int>, int> > q;
  q.push_back(make_pair(make_pair(aa, bb), 0));
  B[aa][bb][0] = 1;
  while (q.size()) {
    int a = q.front().first.first;
    int b = q.front().first.second;
    int dd = q.front().second;
    q.pop_front();
    if (dd == 0) {
      for (int i = 0; i <= a; i++)
        for (int j = 0; j <= b; j++)
          if (deep[a - i][b - j][1 - dd] == deep[a][b][dd] + 1 and
              (i + j > 0) and (i * 50 + j * 100 <= k)) {
            B[a - i][b - j][1 - dd] +=
                (((B[a][b][dd] * C[a][i]) % mod) * C[b][j]) % mod;
            B[a - i][b - j][1 - dd] %= mod;
          } else if (deep[a - i][b - j][1 - dd] == 0 and i + j > 0 and
                     (i * 50 + j * 100 <= k)) {
            q.push_back(make_pair(make_pair(a - i, b - j), 1 - dd));
            deep[a - i][b - j][1 - dd] = deep[a][b][dd] + 1;
            B[a - i][b - j][1 - dd] =
                (((B[a][b][dd] * C[a][i]) % mod) * C[b][j]) % mod;
          }
    } else {
      int c = aa - a;
      int d = bb - b;
      for (int i = 0; i <= c; i++)
        for (int j = 0; j <= d; j++)
          if (deep[a + i][b + j][1 - dd] == deep[a][b][dd] + 1 and
              (i + j > 0) and (i * 50 + j * 100 <= k)) {
            B[a + i][b + j][1 - dd] +=
                (((B[a][b][dd] * C[c][i]) % mod) * C[d][j]) % mod;
            B[a + i][b + j][1 - dd] %= mod;
          } else if (deep[a + i][b + j][1 - dd] == 0 and (i + j > 0) and
                     (i * 50 + j * 100 <= k)) {
            q.push_back(make_pair(make_pair(a + i, b + j), 1 - dd));
            deep[a + i][b + j][1 - dd] = deep[a][b][dd] + 1;
            B[a + i][b + j][1 - dd] =
                (((B[a][b][dd] * C[c][i]) % mod) * C[d][j]) % mod;
          }
    }
  }
  int AA, BB;
  if (deep[0][0][1] == 0) {
    AA = -1;
    BB = 0;
  } else {
    AA = deep[0][0][1] - 1;
    BB = B[0][0][1];
  }
  cout << AA << endl << BB << endl;
  return 0;
}
