#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
long long C[55][55];
int N, K;
int a0, b0;
long long dp[205][55][55];
long long mod_pow(int a, int b) {
  if (b == 1) return a;
  if (b % 2) {
    long long r = mod_pow(a, b - 1);
    return a * r % MOD;
  } else {
    long long r = mod_pow(a, b / 2);
    return r * r % MOD;
  }
}
long long mod_inv(int a) { return mod_pow(a, MOD - 2); }
int main() {
  C[0][0] = 1;
  for (int i = 1; i <= 50; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++) {
      C[i][j] = C[i][j - 1] * (i - j + 1) % MOD * mod_inv(j) % MOD;
    }
  }
  cin >> N >> K;
  a0 = b0 = 0;
  for (int i = 0; i < N; i++) {
    int kg;
    cin >> kg;
    if (kg == 50) a0++;
    if (kg == 100) b0++;
  }
  memset(dp, 0, sizeof(dp));
  dp[0][a0][b0] = 1;
  for (int count = 0; count <= 200; count++) {
    for (int a1 = 0; a1 <= a0; a1++) {
      for (int b1 = 0; b1 <= b0; b1++) {
        long long base = dp[count][a1][b1];
        for (int a2 = 0; a2 <= a1; a2++) {
          for (int b2 = 0; b2 <= b1; b2++) {
            if (a2 == 0 && b2 == 0) continue;
            if (a2 * 50 + b2 * 100 > K) continue;
            long long comb = C[a1][a2] * C[b1][b2] % MOD;
            int a3 = a0 - a1 + a2;
            int b3 = b0 - b1 + b2;
            dp[count + 1][a3][b3] += base * comb;
            dp[count + 1][a3][b3] %= MOD;
          }
        }
      }
    }
    if (((count + 1) % 2) && (dp[count + 1][a0][b0] != 0)) {
      printf("%d\n", count + 1);
      printf("%I64d\n", dp[count + 1][a0][b0]);
      return 0;
    }
  }
  printf("%d\n", -1);
  printf("%d\n", 0);
  return 0;
}
