#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 1;
const int MOD = 1e9 + 7;
const long double PI = 3.141592653589793;
const long double EPS = 1e-8;
long long dp[2][101][101];
long long C[100][100];
int main() {
  int n, k;
  cin >> n >> k;
  int cnt50 = 0;
  int cnt100 = 0;
  for (int i = 0; i <= 50; ++i) {
    C[i][0] = 1;
    for (int j = 1; j <= i; ++j)
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD;
  }
  for (int i = 1; i <= n; ++i) {
    int a;
    cin >> a;
    if (a == 100)
      ++cnt100;
    else
      ++cnt50;
  }
  int ans = 0;
  dp[1][cnt50][cnt100] = 1;
  int tp = 1;
  while (1) {
    ++ans;
    for (int i = 0; i <= cnt50; ++i)
      for (int j = 0; j <= cnt100; ++j)
        for (int l = 0; l <= cnt50; ++l)
          for (int e = 0; e <= cnt100; ++e) {
            if (tp == 1 && l * 50 + e * 100 <= k && l + e > 0 && l <= i &&
                    e <= j ||
                tp == 0 && l * 50 + e * 100 <= k && l + e > 0 &&
                    l <= cnt50 - i && e <= cnt100 - j) {
              if (tp == 1) {
                dp[0][i - l][j - e] =
                    (dp[0][i - l][j - e] +
                     dp[1][i][j] * C[i][l] % MOD * C[j][e] % MOD) %
                    MOD;
              } else {
                dp[1][i + l][j + e] =
                    (dp[1][i + l][j + e] + dp[0][i][j] * C[cnt50 - i][l] % MOD *
                                               C[cnt100 - j][e] % MOD) %
                    MOD;
              }
            }
          }
    if (dp[0][0][0]) {
      cout << ans << "\n";
      cout << dp[0][0][0];
      return 0;
    }
    if (ans > 200) {
      cout << -1 << "\n" << 0;
      return 0;
    }
    tp = !tp;
  }
}
