#include <bits/stdc++.h>
using namespace std;
const long long N = 51, K = 5010;
const long long Inf = 1e9;
long long n, k, cnt[3], a, Hash = 1, dis[N * N * 2], rep[N * N * 2],
                           dp[N * N * 2 + 1][N * N * 2 + 1];
const long long Mod = 1e9 + 7;
vector<pair<long long, long long> > v[N * N * 2];
map<pair<long long, pair<long long, long long> >, long long> mp;
priority_queue<pair<long long, long long>, vector<pair<long long, long long> >,
               greater<pair<long long, long long> > >
    Q;
long long C(long long x, long long r) { return dp[x][r]; }
void dik(long long idx) {
  for (long long i = cnt[1]; i >= 0; i--) {
    for (long long j = cnt[2]; j >= 0; j--) {
      for (long long r = 0; r <= 1; r++) {
        dis[mp[{i, {j, r}}]] = Inf;
        rep[mp[{i, {j, r}}]] = 1;
      }
    }
  }
  dis[idx] = 0;
  Q.push({0, idx});
  while (!Q.empty()) {
    pair<long long, long long> x = Q.top();
    Q.pop();
    if (dis[x.second] < x.first) continue;
    for (auto j : v[x.second]) {
      long long cost = j.second;
      if (dis[j.first] < dis[x.second] + 1)
        continue;
      else if (dis[j.first] == dis[x.second] + 1)
        rep[j.first] = (rep[j.first] + (rep[x.second] * cost) % Mod) % Mod;
      else {
        rep[j.first] = (cost * rep[x.second]) % Mod;
        dis[j.first] = dis[x.second] + 1;
        Q.push({dis[j.first], j.first});
      }
    }
  }
}
int main() {
  cin >> n >> k;
  for (long long i = 0; i <= N * N * 2; i++) {
    dp[i][0] = 1;
  }
  for (long long i = 1; i <= N * N * 2; i++) {
    for (long long j = 0; j <= N * N * 2; j++) {
      dp[i][j] = (dp[i - 1][j] + dp[i - 1][j - 1]) % Mod;
    }
  }
  for (long long i = 0; i < n; i++) {
    cin >> a;
    a == 50 ? cnt[1]++ : cnt[2]++;
  }
  for (long long i = cnt[1]; i >= 0; i--) {
    for (long long j = cnt[2]; j >= 0; j--) {
      for (long long r = 0; r <= 1; r++) {
        mp[{i, {j, r}}] = Hash++;
      }
    }
  }
  for (long long i = cnt[1]; i >= 0; i--) {
    for (long long j = cnt[2]; j >= 0; j--) {
      for (long long x = 0; x <= 1; x++) {
        if (!x) {
          for (long long r = i; r >= 0; r--) {
            for (long long q = j; q >= 0; q--) {
              if ((i - r) * 50 + (j - q) * 100 <= k &&
                  (i - r) * 50 + (j - q) * 100 > 0) {
                v[mp[{i, {j, x}}]].push_back(
                    {mp[{r, {q, !x}}], (C(i, r) * C(j, q)) % Mod});
              }
            }
          }
        } else {
          for (long long r = 0; r <= cnt[1] - i; r++) {
            for (long long q = 0; q <= cnt[2] - j; q++) {
              if (r * 50 + q * 100 <= k && r * 50 + q * 100 > 0)
                v[mp[{i, {j, x}}]].push_back(
                    {mp[{i + r, {j + q, !x}}],
                     (C(cnt[1] - i, r) * C(cnt[2] - j, q)) % Mod});
            }
          }
        }
      }
    }
  }
  dik(mp[{cnt[1], {cnt[2], 0}}]);
  if (dis[mp[{0, {0, 1}}]] == Inf)
    dis[mp[{0, {0, 1}}]] = -1, rep[mp[{0, {0, 1}}]] = 0;
  cout << dis[mp[{0, {0, 1}}]] << endl << rep[mp[{0, {0, 1}}]];
  return 0;
}
