#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007LL;
const int oo = 1061109567;
const int MAX = 52;
int N, K;
int C50, C100;
int dist[MAX][MAX][2];
long long dp[MAX][MAX][2], comb[MAX][MAX];
vector<pair<int, int> > from[MAX][MAX][2];
void bfs() {
  memset(dist, 63, sizeof dist);
  queue<pair<pair<int, int>, int> > Q;
  dist[0][0][0] = 0;
  Q.push(pair<pair<int, int>, int>(pair<int, int>(0, 0), 0));
  while (!Q.empty()) {
    int x = Q.front().first.first, y = Q.front().first.second,
        s = Q.front().second;
    Q.pop();
    int here1, here2;
    if (!s) {
      here1 = C50 - x;
      here2 = C100 - y;
    } else {
      here1 = x;
      here2 = y;
    }
    if (!here1 && !here2) continue;
    for (int i = 0; i <= here1; i++) {
      for (int j = 0; j <= here2; j++) {
        int sum = 50 * i + 100 * j, xx, yy;
        if (sum == 0 || sum > K) continue;
        if (!s) {
          xx = x + i;
          yy = y + j;
        } else {
          xx = x - i;
          yy = y - j;
        }
        if (dist[x][y][s] + 1 <= dist[xx][yy][s ^ 1]) {
          if (dist[x][y][s] + 1 < dist[xx][yy][s ^ 1]) {
            from[xx][yy][s ^ 1].clear();
            dist[xx][yy][s ^ 1] = dist[x][y][s] + 1;
            Q.push(pair<pair<int, int>, int>(pair<int, int>(xx, yy), s ^ 1));
          }
          from[xx][yy][s ^ 1].push_back(pair<int, int>(x, y));
        }
      }
    }
  }
}
long long calc(int x, int y, int s) {
  long long &ret = dp[x][y][s];
  if (ret != -1) return ret;
  ret = 0;
  for (int i = 0; i < (int)from[x][y][s].size(); i++) {
    int xx = from[x][y][s][i].first, yy = from[x][y][s][i].second;
    int n1, k1, n2, k2;
    if (s) {
      n1 = C50 - xx;
      n2 = C100 - yy;
    } else {
      n1 = xx;
      n2 = yy;
    }
    k1 = ((x - xx) < 0 ? -(x - xx) : (x - xx)),
    k2 = ((y - yy) < 0 ? -(y - yy) : (y - yy));
    ret = (ret + comb[n1][k1] * comb[n2][k2] * calc(xx, yy, s ^ 1)) % MOD;
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  for (int i = 0; i < MAX; i++) {
    comb[i][0] = comb[i][i] = 1;
    for (int j = 1; j < i; j++)
      comb[i][j] = (comb[i - 1][j] + comb[i - 1][j - 1]) % MOD;
  }
  cin >> N >> K;
  for (int i = 0; i < N; i++) {
    int x;
    cin >> x;
    if (x == 50)
      C50++;
    else
      C100++;
  }
  bfs();
  memset(dp, -1, sizeof dp);
  dp[0][0][0] = 1;
  long long ans = calc(C50, C100, 1);
  if (dist[C50][C100][1] < oo)
    cout << dist[C50][C100][1] << endl;
  else
    cout << "-1\n";
  cout << ans << endl;
  return 0;
}
