#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0, 1, -1, 1, -1};
int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int WHITE = 0, GRAY = 1, BLACK = 2, GREEN = 3, BLUE = 4;
const int LIM = 1e+6, LIM1 = 55;
const long long INF = 1e+9, MOD = 1e+9 + 7;
const double PI = 3.141592653589793, EPS = 1e-7;
long long C[LIM1][LIM1];
void C_initialize(int size, long long mod) {
  for (int n = 0; n <= size; n++) {
    C[n][0] = C[n][n] = 1;
    for (int k = 1; k < n; k++) {
      C[n][k] = (C[n - 1][k - 1] + C[n - 1][k]) % mod;
    }
  }
}
int x50, x100, n, k, d[LIM1][LIM1][2];
bool used[LIM1][LIM1][2];
long long cnt[LIM1][LIM1][2];
struct vertex {
  int x50, x100, b;
  long long cnt;
  vertex() {}
  vertex(int x50, int x100, int b) : x50(x50), x100(x100), b(b), cnt(1) {}
};
void bfs(vertex u) {
  queue<vertex> q;
  q.push(u);
  used[u.x50][u.x100][u.b] = true;
  d[u.x50][u.x100][u.b] = 0;
  cnt[u.x50][u.x100][u.b] = 1;
  while (!q.empty()) {
    vertex u = q.front();
    q.pop();
    int dx50 = x50 - u.x50, dx100 = x100 - u.x100, db = !u.b;
    for (int i = 0; i <= u.x50; i++) {
      for (int j = 0; j <= u.x100; j++) {
        if (i + j > 0 && i * 50 + j * 100 <= k) {
          if (!used[dx50 + i][dx100 + j][db]) {
            q.push(vertex(dx50 + i, dx100 + j, db));
            d[dx50 + i][dx100 + j][db] = d[u.x50][u.x100][u.b] + 1;
            used[dx50 + i][dx100 + j][db] = true;
            cnt[dx50 + i][dx100 + j][db] =
                cnt[u.x50][u.x100][u.b] * (C[u.x50][i] * C[u.x100][j]) % MOD;
          } else if (d[dx50 + i][dx100 + j][db] == d[u.x50][u.x100][u.b] + 1) {
            cnt[dx50 + i][dx100 + j][db] =
                (cnt[dx50 + i][dx100 + j][db] +
                 cnt[u.x50][u.x100][u.b] % MOD * (C[u.x50][i] * C[u.x100][j]) %
                     MOD) %
                MOD;
          }
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x == 50)
      x50++;
    else
      x100++;
  }
  C_initialize(n + 1, MOD);
  bfs(vertex(x50, x100, 0));
  if (!used[x50][x100][1]) {
    cout << -1 << '\n' << 0;
  } else {
    cout << d[x50][x100][1] << '\n' << cnt[x50][x100][1];
  }
  return 0;
}
