#include <bits/stdc++.h>
using namespace std;
long long n, k;
pair<long long, long long> dp[2][51][51][102];
long long p, q;
long long c[51][51];
long long C(long long n, long long r) {
  if (n < r) {
    return 0;
  }
  if (n == r) {
    return 1;
  }
  if (r == 0) {
    return 1;
  }
  if (c[n][r] != -1) return c[n][r];
  return c[n][r] = (C(n - 1, r - 1) + C(n - 1, r)) % 1000000007;
  ;
}
pair<long long, long long> run(long long bank, long long p50, long long p100,
                               long long last) {
  if ((dp[bank][p50][p100][last]).first != -1) {
    return dp[bank][p50][p100][last];
  }
  if (bank == 1 && p50 + p100 == n) {
    return dp[bank][p50][p100][last] = {1, 0};
  }
  if (bank == 0) {
    long long ans = 1e9;
    long long way = 0;
    for (long long i = 0; i <= p50; i++) {
      for (long long j = 0; j <= p100; j++) {
        if (i + 2 * j > k) break;
        if (i + j == 0) continue;
        if (i + 2 * j > last) {
          pair<long long, long long> save =
              run(1, p - p50 + i, q - p100 + j, 0);
          long long hss = C(p50, i) * C(p100, j);
          hss %= 1000000007;
          if (save.second + 1 < ans) {
            ans = save.second + 1;
            way = (1LL * hss * save.first) % 1000000007;
          } else if (save.second + 1 == ans) {
            way = (way + (1LL * hss * save.first) % 1000000007) % 1000000007;
          }
        }
      }
    }
    return dp[bank][p50][p100][last] = {way, ans};
  } else {
    long long ans = 1e9;
    long long way = 0;
    for (long long i = 0; i <= p50; i++) {
      for (long long j = 0; j <= p100; j++) {
        if (i + 2 * j > k) break;
        if (i + j == 0) continue;
        pair<long long, long long> save =
            run(0, p - p50 + i, q - p100 + j, i + 2 * j);
        long long hss = C(p50, i) * C(p100, j);
        hss %= 1000000007;
        if (save.second + 1 < ans) {
          ans = save.second + 1;
          way = (1LL * hss * save.first) % 1000000007;
        } else if (save.second + 1 == ans) {
          way = (way + (1LL * hss * save.first) % 1000000007) % 1000000007;
        }
      }
    }
    return dp[bank][p50][p100][last] = {way, ans};
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  memset(c, -1, sizeof c);
  for (long long i = 0; i < 2; i++)
    for (long long j = 0; j < 51; j++)
      for (long long k = 0; k < 51; k++)
        for (long long l = 0; l <= 100; l++) dp[i][j][k][l] = {-1, -1};
  cin >> n >> k;
  long long a;
  for (long long i = 0; i < n; i++) {
    cin >> a;
    if (a == 50) p++;
  }
  q = n - p;
  k /= 50;
  run(0, p, q, 0);
  if (dp[0][p][q][0].second >= 1e9) {
    cout << -1 << '\n';
  } else
    cout << dp[0][p][q][0].second << '\n';
  cout << dp[0][p][q][0].first;
}
