#include <bits/stdc++.h>
using namespace std;
queue<pair<pair<int, int>, bool> > q;
map<pair<pair<int, int>, bool>, int> use;
int kol[2];
int n, k1;
int bfs() {
  q.push(make_pair(make_pair(kol[0], kol[1]), 0));
  use.insert(make_pair(q.front(), 0));
  while (!q.empty()) {
    pair<pair<int, int>, bool> k = q.front();
    int dst = use[k];
    q.pop();
    for (int i = 0; i < int(k.first.first + 1); i++)
      for (int j = 0; j < int(k.first.second + 1); j++) {
        if (i + j == 0) continue;
        if (i * 50 + j * 100 > k1) continue;
        pair<pair<int, int>, bool> help = make_pair(
            make_pair(kol[0] - k.first.first + i, kol[1] - k.first.second + j),
            1 - k.second);
        if (use.find(help) == use.end()) {
          use.insert(make_pair(help, dst + 1));
          q.push(help);
        }
      }
  }
  if (use.find(make_pair(make_pair(kol[0], kol[1]), 1)) == use.end()) return -1;
  return use[make_pair(make_pair(kol[0], kol[1]), 1)];
}
long long mod = 1000000007;
long long d[60][60][500];
long long c[60][60];
int main() {
  cin >> n >> k1;
  for (int i = 0; i < int(n); i++) {
    int a;
    cin >> a;
    if (a == 50)
      kol[0]++;
    else
      kol[1]++;
  }
  int kol1 = bfs();
  if (kol1 == -1) {
    cout << -1 << endl;
    cout << 0 << endl;
    return 0;
  }
  d[kol[0]][kol[1]][0] = 1;
  for (int i = 0; i < int(60); i++) c[i][0] = 1;
  for (int i = 1; i < 60; ++i)
    for (int j = 1; j < 60; ++j)
      c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % mod;
  for (int k = 0; k < kol1; ++k) {
    for (int i = 0; i <= kol[0]; ++i) {
      for (int j = 0; j <= kol[1]; ++j) {
        if (i + j == 0 || d[i][j][k] == 0) continue;
        for (int i1 = 0; i1 <= i; ++i1) {
          for (int j1 = 0; j1 <= j; ++j1) {
            if (i1 + j1 == 0 || 50 * i1 + 100 * j1 > k1) continue;
            (d[kol[0] - i + i1][kol[1] - j + j1][k + 1] +=
             (d[i][j][k] * (c[i][i1] * c[j][j1]) % mod) % mod) %= mod;
          }
        }
      }
    }
  }
  cout << kol1 << endl;
  cout << d[kol[0]][kol[1]][kol1] << endl;
  return 0;
}
