#include <bits/stdc++.h>
using namespace std;
long long ncr[100][100];
void nCr(long long NNN) {
  for (long long i = 0; i <= NNN; i++)
    for (long long j = 0; j <= i; j++)
      if (j == 0 || j == i)
        ncr[i][j] = 1;
      else
        ncr[i][j] = (ncr[i - 1][j - 1] + ncr[i - 1][j]) % 1000000007;
  return;
}
int main() {
  nCr(60);
  long long dp[2][55][55], a = 0, b = 0, x;
  long long n, t, ch = 0, cnt = 0;
  cin >> n >> t;
  t /= 50;
  memset(dp, 0, sizeof(dp));
  while (n--) {
    scanf("%lld", &x);
    x == 50 ? a++ : b++;
  }
  dp[0][a][b] = 1;
  while (1) {
    ch ^= 1;
    cnt++;
    memset(dp[ch], 0, sizeof(dp[ch]));
    if (ch) {
      for (long long i = 0; i <= a; i++)
        for (long long j = 0; j <= b; j++)
          for (long long ii = 0; ii <= i; ii++) {
            if (ii > t) break;
            for (long long jj = 0; jj <= j; jj++) {
              if (ii + jj == 0) continue;
              if (ii + jj * 2 > t) break;
              dp[ch][i - ii][j - jj] +=
                  (dp[ch ^ 1][i][j] * (ncr[i][ii] * ncr[j][jj]) % 1000000007) %
                  1000000007;
              dp[ch][i - ii][j - jj] %= 1000000007;
            }
          }
    } else {
      for (long long i = 0; i <= a; i++)
        for (long long j = 0; j <= b; j++)
          for (long long ii = 0; ii <= a; ii++) {
            if (ii + i > a || ii > t) break;
            for (long long jj = 0; jj <= b; jj++) {
              if (ii + jj == 0) continue;
              if (j + jj > b || ii + jj * 2 > t) break;
              dp[ch][i + ii][j + jj] +=
                  (dp[ch ^ 1][i][j] * (ncr[a - i][ii] * ncr[b - j][jj]) %
                   1000000007) %
                  1000000007;
              dp[ch][i + ii][j + jj] %= 1000000007;
            }
          }
    }
    if (dp[ch][0][0]) {
      cout << cnt << endl;
      cout << dp[ch][0][0] << endl;
      return 0;
    }
    if (cnt > 200) break;
  }
  cout << -1 << endl;
  cout << 0 << endl;
  return 0;
}
