#include <bits/stdc++.h>
using namespace std;
const int maxn = 55;
const int mod = 1000000007;
long long dp[maxn][maxn][2];
long long C[maxn][maxn];
int n, k, A, B;
void init() {
  C[0][0] = 1;
  for (int i = 1; i <= 50; i++) {
    C[i][0] = C[i][i] = 1;
    for (int j = 1; j < i; j++) C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
  }
}
struct node {
  int a, b, c;
  long long step;
  node() {}
  node(int x, int y, int z, int s) {
    a = x;
    b = y;
    c = z;
    step = s;
  }
};
queue<node> q;
int vis[maxn][maxn][2];
void solve() {
  while (!q.empty()) q.pop();
  q.push(node(A, B, 0, 0));
  memset(vis, -1, sizeof(vis));
  vis[A][B][0] = 0;
  while (!q.empty()) {
    int sz = q.size();
    int step;
    while (sz--) {
      node fr = q.front();
      q.pop();
      int a = fr.a, b = fr.b, c = fr.c;
      step = fr.step;
      step++;
      if (c == 0) {
        for (int i = 0; i <= a; i++)
          for (int j = 0; j <= b; j++) {
            if (i + j == 0 || i * 50 + j * 100 > k) continue;
            long long tmp = dp[a][b][c] * C[a][i] % mod * C[b][j] % mod;
            if (vis[a - i][b - j][1] == -1) {
              dp[a - i][b - j][1] += tmp;
              dp[a - i][b - j][1] %= mod;
              vis[a - i][b - j][1] = step;
              q.push(node(a - i, b - j, 1, step));
            } else if (vis[a - i][b - j][1] == step) {
              dp[a - i][b - j][1] += tmp;
              dp[a - i][b - j][1] %= mod;
            }
          }
      } else {
        for (int i = 0; i <= A - a; i++)
          for (int j = 0; j <= B - b; j++) {
            if (i + j == 0 || i * 50 + j * 100 > k) continue;
            long long tmp = dp[a][b][c] * C[A - a][i] % mod * C[B - b][j] % mod;
            if (vis[a + i][b + j][!c] == -1) {
              dp[a + i][b + j][0] += tmp;
              dp[a + i][b + j][0] %= mod;
              vis[a + i][b + j][0] = step;
              q.push(node(a + i, b + j, 0, step));
            } else if (vis[a + i][b + j][0] == step) {
              dp[a + i][b + j][0] += tmp;
              dp[a + i][b + j][0] %= mod;
            }
          }
      }
    }
    if (vis[0][0][1] != -1) {
      printf("%d\n", step);
      printf("%I64d\n", dp[0][0][1]);
      return;
    }
  }
  printf("-1\n0\n");
}
int main() {
  init();
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    int w;
    scanf("%d", &w);
    if (w == 50)
      A++;
    else
      B++;
  }
  dp[A][B][0] = 1;
  solve();
}
