#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int INF = 2e9;
const long long INF64 = 9e18;
const long double EPS = 1e-12;
const long double PI = 3.1415926535897932384626433832795028841;
const long long MD = 925262732;
const long long T = 634521;
const int N = 200100;
const int M = 501;
long long d[201][51][51], cnk[51][51];
int n, k, first, second;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  for (int i = 0; i < int(n); i++) {
    int q;
    cin >> q;
    if (q == 50)
      first++;
    else
      second++;
  }
  cnk[0][0] = 1;
  for (int i = 1; i <= 50; i++)
    for (int j = 0; j <= i; j++) {
      if (j == 0)
        cnk[i][j] = 1;
      else
        cnk[i][j] = (cnk[i - 1][j] + cnk[i - 1][j - 1]) % MOD;
    }
  d[0][first][second] = 1;
  for (int u = 0; u < 200; u++)
    for (int i = 0; i <= first; i++)
      for (int j = 0; j <= second; j++)
        if (d[u][i][j]) {
          for (long long ii = 0; ii <= i; ii++)
            for (long long jj = 0; jj <= j; jj++)
              if (ii + jj > 0) {
                if ((ii * 50 + jj * 100) <= k) {
                  long long q =
                      (((d[u][i][j] * cnk[i][ii] % MOD)) * cnk[j][jj]) % MOD;
                  d[u + 1][first - i + ii][second - j + jj] += q;
                  d[u + 1][first - i + ii][second - j + jj] %= MOD;
                } else
                  break;
              }
        }
  long long v = -1, sum = 0;
  for (int i = 1; i <= 200; i += 2)
    if (d[i][first][second] != 0) {
      v = i;
      sum = d[i][first][second];
      break;
    }
  cout << v << endl << sum;
  return 0;
}
