#include <bits/stdc++.h>
using namespace std;
long long f(long long A) { return A % 1000000007; }
int n, K, a, b, i, j, x, y;
long long C[100][100];
long long ans[205][55][55];
long long res[205][55][55];
int main() {
  cin >> n >> K;
  K /= 50;
  while (n--) {
    cin >> i;
    if (i == 50)
      a++;
    else
      b++;
  }
  for (i = 0; i <= 50; i++) C[i][0] = 1;
  for (i = 1; i <= 50; i++)
    for (j = 1; j <= i; j++) C[i][j] = f(C[i - 1][j - 1] + C[i - 1][j]);
  res[0][a][b] = 1;
  for (n = 0; n < 200; n++)
    for (i = 0; i <= a; i++)
      for (j = 0; j <= b; j++) {
        if (n % 2 == 0) {
          for (x = 0; x <= i; x++)
            for (y = 0; y <= j; y++)
              if (x + y > 0 && x + 2 * y <= K)
                res[n + 1][i - x][j - y] =
                    f(res[n + 1][i - x][j - y] +
                      res[n][i][j] * f(C[i][x] * C[j][y]));
        } else {
          for (x = 0; x <= a - i; x++)
            for (y = 0; y <= b - j; y++)
              if (x + y > 0 && x + 2 * y <= K)
                res[n + 1][i + x][j + y] =
                    f(res[n + 1][i + x][j + y] +
                      res[n][i][j] * f(C[a - i][x] * C[b - j][y]));
        }
      }
  n = 1;
  while (n < 200 && !res[n][0][0]) n += 2;
  if (n > 200) {
    cout << "-1\n0\n";
    return 0;
  }
  cout << n << endl;
  cout << res[n][0][0] << endl;
}
