#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long mod = 1e9 + 7;
const int N = 55;
int n, k;
int fifty = 0, hund = 0;
long long dp[N][N][2];
long long ways[N][N][2];
long long ncr[N][N];
queue<pair<pair<long long, long long>, pair<long long, long long> > > Q;
long long toggle = 0;
void NCR() {
  ncr[0][0] = 1;
  for (int i = 1; i <= 50; ++i) {
    ncr[i][0] = 1;
    for (int j = 1; j <= 50; ++j) {
      ncr[i][j] = ncr[i - 1][j - 1] + ncr[i - 1][j];
      ncr[i][j] %= mod;
      if (ncr[i][j] < 0) ncr[i][j] += mod;
    }
  }
}
void DP(long long f, long long h, long long side, long long cnt) {
  Q.push(make_pair(make_pair(f, h), make_pair(side, cnt)));
  while (!Q.empty()) {
    pair<pair<long long, long long>, pair<long long, long long> > yolo =
        Q.front();
    Q.pop();
    if (toggle and yolo.second.second > toggle) continue;
    if (yolo.first.first == fifty and yolo.first.second == hund and
        yolo.second.first == 1) {
      toggle = yolo.second.second;
      dp[fifty][hund][1] = toggle;
      continue;
    }
    if (yolo.second.second >=
        dp[yolo.first.first][yolo.first.second][yolo.second.first])
      continue;
    dp[yolo.first.first][yolo.first.second][yolo.second.first] =
        min(dp[yolo.first.first][yolo.first.second][yolo.second.first],
            yolo.second.second);
    for (int i = 0; i <= yolo.first.first; ++i)
      for (int j = 0; j <= yolo.first.second; ++j) {
        if (i + j == 0) continue;
        if (50 * i + 100 * j > k) continue;
        if (1 + yolo.second.second <=
            dp[fifty - yolo.first.first + i][hund - yolo.first.second + j]
              [1 - yolo.second.first]) {
          long long temp = 0;
          temp = ways[yolo.first.first][yolo.first.second][yolo.second.first] *
                 (ncr[yolo.first.first][i]);
          temp %= mod;
          if (temp < 0) temp += mod;
          temp *= ncr[yolo.first.second][j];
          temp %= mod;
          if (temp < 0) temp += mod;
          ways[fifty - yolo.first.first + i][hund - yolo.first.second + j]
              [1 - yolo.second.first] += temp;
          ways[fifty - yolo.first.first + i][hund - yolo.first.second + j]
              [1 - yolo.second.first] %= mod;
          if (ways[fifty - yolo.first.first + i][hund - yolo.first.second + j]
                  [1 - yolo.second.first] < 0)
            ways[fifty - yolo.first.first + i][hund - yolo.first.second + j]
                [1 - yolo.second.first] += mod;
          Q.push(make_pair(
              make_pair(fifty - yolo.first.first + i,
                        hund - yolo.first.second + j),
              make_pair(1 - yolo.second.first, yolo.second.second + 1)));
        }
      }
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> k;
  memset(ncr, 0, sizeof(ncr));
  NCR();
  for (int i = 1; i <= n; ++i) {
    int w;
    cin >> w;
    if (w == 50)
      fifty++;
    else
      hund++;
  }
  memset(ways, 0, sizeof(ways));
  for (int i = 0; i <= n; ++i)
    for (int j = 0; j <= n; ++j)
      for (int k = 0; k <= 1; ++k) dp[i][j][k] = mod;
  ways[fifty][hund][0] = 1;
  DP(fifty, hund, 0, 0);
  long long ans = dp[fifty][hund][1];
  if (ans == mod or ans == -1) {
    cout << -1 << endl;
    cout << 0;
    return 0;
  } else
    cout << ans << endl;
  cout << ways[fifty][hund][1] << endl;
  return 0;
}
