#include <bits/stdc++.h>
using namespace std;
const long long N = 55, mod = 1e9 + 7;
long long c[N][N], w[N], dp[2][N][N];
void init() {
  c[0][0] = 1;
  for (long long i = 1; i < N; i++) {
    c[i][0] = 1;
    for (long long j = 1; j < N; j++)
      c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % mod;
  }
}
signed main() {
  init();
  long long n, k, cnt1 = 0, cnt2 = 0;
  scanf("%lld%lld", &n, &k);
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &w[i]);
    cnt1 += (w[i] == 50), cnt2 += (w[i] == 100);
  }
  dp[0][cnt1][cnt2] = 1;
  for (long long i = 0; i <= 4 * n; i++) {
    memset(dp[1], 0, sizeof(dp[1]));
    for (long long a = 0; a <= cnt1; a++) {
      for (long long b = 0; b <= cnt2; b++) {
        if (a + b == 0 || a * 50 + b * 100 > k) continue;
        for (long long x = a; x <= cnt1; x++) {
          for (long long y = b; y <= cnt2; y++) {
            dp[1][x - a][y - b] =
                (dp[1][x - a][y - b] + dp[0][x][y] * c[x][a] % mod * c[y][b]) %
                mod;
          }
        }
      }
    }
    if (dp[1][0][0]) {
      printf("%lld\n%lld", i * 2 + 1, dp[1][0][0]);
      return 0;
    }
    memset(dp[0], 0, sizeof(dp[0]));
    for (long long a = 0; a <= cnt1; a++) {
      for (long long b = 0; b <= cnt2; b++) {
        if (a + b == 0 || a * 50 + b * 100 > k) continue;
        for (long long x = 0; x + a <= cnt1; x++)
          for (long long y = 0; y + b <= cnt2; y++)
            dp[0][x + a][y + b] =
                (dp[0][x + a][y + b] +
                 dp[1][x][y] * c[cnt1 - x][a] % mod * c[cnt2 - y][b]) %
                mod;
      }
    }
  }
  printf("-1\n0");
  return 0;
}
