#include <bits/stdc++.h>
using namespace std;
const int mod = 1000 * 1000 * 1000 + 7;
const int INF = 1000 * 1000 * 1000;
const long long LINF = (long long)INF * INF;
int n, W, c50, c100;
long long comb[60][60];
int dist[60][60][2];
long long ways[60][60][2];
int32_t main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  for (int i = (0); i < (60); i++) {
    comb[i][0] = comb[i][i] = 1;
    for (int j = (1); j < (i); j++) {
      comb[i][j] = (comb[i - 1][j - 1] + comb[i - 1][j]) % mod;
    }
  }
  cin >> n >> W;
  for (int i = (0); i < (n); i++) {
    int tmp;
    cin >> tmp;
    (tmp == 50 ? c50++ : c100++);
  };
  ;
  ;
  ;
  queue<pair<pair<int, int>, int>> q;
  q.push(make_pair(make_pair(c50, c100), 0));
  dist[c50][c100][0] = 1;
  ways[c50][c100][0] = 1;
  while (!q.empty()) {
    pair<pair<int, int>, int> v = q.front();
    q.pop();
    int cur50 = (v.second == 0 ? v.first.first : c50 - v.first.first);
    int cur100 = (v.second == 0 ? v.first.second : c100 - v.first.second);
    int dir = (v.second == 0 ? -1 : 1);
    for (int i = (0); i < (cur50 + 1); i++) {
      for (int j = (0); j < (cur100 + 1); j++) {
        if (i + j == 0 || 50 * i + 100 * j > W) continue;
        int &curd = dist[v.first.first][v.first.second][v.second];
        int &ngbd = dist[v.first.first + dir * i][v.first.second + dir * j]
                        [1 - v.second];
        long long &curw = ways[v.first.first][v.first.second][v.second];
        long long &ngbw = ways[v.first.first + dir * i]
                              [v.first.second + dir * j][1 - v.second];
        if (ngbd > 0 && curd + 1 > ngbd) continue;
        if (curd + 1 == ngbd) {
          ngbw = (ngbw + comb[cur50][i] * comb[cur100][j] % mod * curw) % mod;
          continue;
        }
        ngbd = curd + 1;
        ngbw = comb[cur50][i] * comb[cur100][j] % mod * curw % mod;
        q.push(make_pair(
            make_pair(v.first.first + dir * i, v.first.second + dir * j),
            1 - v.second));
      }
    }
  }
  if (!dist[0][0][1]) {
    cout << "-1\n0\n";
    return 0;
  }
  cout << dist[0][0][1] - 1 << '\n' << ways[0][0][1] << '\n';
  return 0;
}
