#include <bits/stdc++.h>
using namespace std;
int const N = 50 + 5, MOD = 1e9 + 7;
long long n, k, n50, n100, a, c[N][N];
pair<long long, long long> dp[N][N][2];
queue<pair<pair<long long, long long>, long long> > que;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  for (int i = 0; i < N; i++) c[0][i] = 1;
  for (int i = 1; i < N; i++) {
    c[i][i] = 1;
    for (int j = i + 1; j < N; j++) c[i][j] = c[i][j - 1] + c[i - 1][j - 1];
  }
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a;
    (a == 50 ? n50++ : n100++);
  }
  for (int i = 0; i <= n50; i++)
    for (int j = 0; j <= n100; j++) dp[i][j][0].first = dp[i][j][1].first = -1;
  dp[n50][n100][0] = make_pair(0, 1);
  que.push(make_pair(make_pair(n50, n100), 0));
  while (que.size()) {
    int x = que.front().first.first, y = que.front().first.second,
        z = que.front().second;
    que.pop();
    if (z) {
      for (int i = 0; i <= n50 - x; i++) {
        for (int j = 0; j <= n100 - y; j++) {
          if (!i && !j) continue;
          if (i * 50 + j * 100 <= k) {
            if (dp[x + i][y + j][0].first == -1 ||
                dp[x + i][y + j][0].first == (dp[x][y][1].first + 1) % MOD) {
              if (dp[x + i][y + j][0].first == -1)
                que.push(make_pair(make_pair(x + i, y + j), 0));
              dp[x + i][y + j][0].first = (dp[x][y][1].first + 1) % MOD;
              (dp[x + i][y + j][0].second +=
               ((c[i][n50 - x] % MOD) * (c[j][n100 - y] % MOD) % MOD) *
               dp[x][y][1].second % MOD) %= MOD;
            }
          }
        }
      }
    } else {
      for (int i = 0; i <= x; i++) {
        for (int j = 0; j <= y; j++) {
          if (!i && !j) continue;
          if (i * 50 + j * 100 <= k) {
            if (dp[x - i][y - j][1].first == -1 ||
                dp[x - i][y - j][1].first == (dp[x][y][0].first + 1) % MOD) {
              if (dp[x - i][y - j][1].first == -1)
                que.push(make_pair(make_pair(x - i, y - j), 1));
              dp[x - i][y - j][1].first = (dp[x][y][0].first + 1) % MOD;
              (dp[x - i][y - j][1].second +=
               ((c[i][x] % MOD) * (c[j][y] % MOD) % MOD) * dp[x][y][0].second %
               MOD) %= MOD;
            }
          }
        }
      }
    }
  }
  cout << dp[0][0][1].first << '\n' << dp[0][0][1].second, 0;
}
