#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long dp[57 + 7][57 + 7];
long long mdp[57 + 7][57 + 7];
bool vis[57 + 7][57 + 7];
int n, K;
long long ncr[57 + 7][57 + 7];
int L, R;
long long func(int l, int r, int i, int j, int k, int m) {
  long long ret = (ncr[l][i] * ncr[r][j]) % mod;
  ret = (ret * ncr[L - l + i][k]) % mod;
  ret = (ret * ncr[R - r + j][m]) % mod;
  return ret;
}
void back(int l, int r) {
  if (vis[l][r]) return;
  mdp[l][r] = 200000007;
  dp[l][r] = 0;
  vis[l][r] = true;
  if (l == 0 && r == 0) {
    mdp[l][r] = 0;
    dp[l][r] = 1;
    return;
  }
  if (l * 50 + r * 100 <= K) {
    mdp[l][r] = 1;
    dp[l][r] = 1;
    return;
  }
  for (int i = 0; i <= l && i * 50 <= K; i++) {
    for (int j = 0; j <= r; j++) {
      if (i == 0 && j == 0) continue;
      if (i * 50 + j * 100 > K) break;
      for (int k = 0; k <= L - l + i; k++) {
        for (int m = 0; m <= R - r + j; m++) {
          if (k * 50 + m * 100 == 0) continue;
          if (k * 50 + m * 100 > K) break;
          if (l * 50 + r * 100 <= (l - i + k) * 50 + (r - j + m) * 100)
            continue;
          back(l - (i - k), r - (j - m));
          mdp[l][r] = min(mdp[l][r], mdp[l - i + k][r - j + m] + 2);
        }
      }
    }
  }
  for (int i = 0; i <= l && i * 50 <= K; i++) {
    for (int j = 0; j <= r; j++) {
      if (i == 0 && j == 0) continue;
      if (i * 50 + j * 100 > K) break;
      for (int k = 0; k <= L - l + i; k++) {
        for (int m = 0; m <= R - r + j; m++) {
          if (k * 50 + m * 100 == 0) continue;
          if (k * 50 + m * 100 > K) break;
          if (l * 50 + r * 100 <= (l - i + k) * 50 + (r - j + m) * 100)
            continue;
          if (mdp[l - i + k][r - j + m] + 2 == mdp[l][r]) {
            dp[l][r] +=
                (func(l, r, i, j, k, m) * dp[l - i + k][r - j + m]) % mod;
            dp[l][r] %= mod;
          }
        }
      }
    }
  }
}
int main() {
  ncr[0][0] = 1;
  for (int i = 1; i <= 57; i++) {
    ncr[i][0] = 1;
    ncr[i][i] = 1;
    ncr[i][1] = i;
  }
  for (int i = 2; i <= 57; i++) {
    for (int j = 2; j < i; j++) {
      ncr[i][j] = (ncr[i - 1][j - 1] + ncr[i - 1][j]) % mod;
    }
  }
  scanf("%d%d", &n, &K);
  int l = 0;
  int r = 0;
  for (int i = 1; i <= n; i++) {
    int v;
    scanf("%d", &v);
    if (v == 50)
      l++;
    else
      r++;
  }
  L = l;
  R = r;
  back(l, r);
  if (mdp[l][r] != 200000007) {
    printf("%d\n", (int)mdp[l][r]);
    printf("%d\n", (int)dp[l][r]);
  } else {
    printf("-1\n0\n");
  }
  return 0;
}
