#include <bits/stdc++.h>
using namespace std;
const int maxN = 111;
const int INF = (int)1e9;
const long long MOD = 7 + (long long)1e9;
const double eps = 1e-9;
long long K[4 * maxN][maxN][maxN];
int dp[4 * maxN][maxN][maxN];
int nn[3];
int n, k;
long long C[maxN][maxN];
int f(int ii, int a, int b) {
  if (ii >= 4 * (n + 1)) {
    return (INF + 1);
  }
  if (dp[ii][a][b] != -1) {
    return dp[ii][a][b];
  }
  int res = INF;
  if (ii % 2 == 0) {
    for (int i = 0; i <= a; i++) {
      for (int j = 0; j <= b && i + 2 * j <= k; j++) {
        if (i + j > 0) res = min(f(ii + 1, a - i, b - j), res);
      }
    }
    for (int i = 0; i <= a; i++) {
      for (int j = 0; j <= b && i + 2 * j <= k; j++) {
        if (f(ii + 1, a - i, b - j) == res && i + j > 0) {
          long long d = ((C[a][i] * K[ii + 1][a - i][b - j]) % MOD) * C[b][j];
          K[ii][a][b] += d;
          K[ii][a][b] %= MOD;
        }
      }
    }
  } else {
    int aa = nn[1] - a;
    int bb = nn[2] - b;
    for (int i = 0; i + a <= nn[1]; i++) {
      for (int j = 0; j + b <= nn[2] && i + 2 * j <= k; j++) {
        if (i + j > 0) res = min(f(ii + 1, a + i, b + j), res);
      }
    }
    for (int i = 0; i <= aa; i++) {
      for (int j = 0; j <= bb && i + 2 * j <= k; j++) {
        if (f(ii + 1, a + i, b + j) == res && i + j > 0) {
          long long d = ((C[aa][i] * K[ii + 1][a + i][b + j]) % MOD) * C[bb][j];
          K[ii][a][b] += d;
          K[ii][a][b] %= MOD;
        }
      }
    }
  }
  dp[ii][a][b] = res + 1;
  return dp[ii][a][b];
}
int main(void) {
  cin >> n >> k;
  k /= 50;
  for (int i = 0; i < 2 * maxN; i++) {
    for (int j = 0; j < maxN; j++) {
      for (int k = 0; k < maxN; k++) {
        dp[i][j][k] = -1;
        K[i][j][k] = 0;
      }
    }
  }
  for (int i = 0; i < 4 * maxN; i++) {
    dp[i][0][0] = 0;
    K[i][0][0] = 1;
  }
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    x /= 50;
    nn[x]++;
  }
  for (int i = 0; i < maxN; i++) {
    C[i][i] = C[i][0] = 1;
    for (int j = 1; j < i; j++) {
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;
    }
  }
  for (int i = 0; i < n; i++) {
    dp[i][0][0] = 0;
  }
  int a = nn[1];
  int b = nn[2];
  f(0, nn[1], nn[2]);
  if (dp[0][nn[1]][nn[2]] >= INF) {
    cout << -1 << endl;
    cout << 0 << endl;
    return 0;
  }
  cout << dp[0][nn[1]][nn[2]] << endl;
  cout << K[0][nn[1]][nn[2]] << endl;
  return 0;
}
