#include <bits/stdc++.h>
using namespace std;
const int MAXN = 51;
const int BASE = 1000000007ll;
struct State {
  State(int p, int a, int b, int len) : p(p), a(a), b(b), len(len) {}
  int p, a, b, len;
};
int n, k;
long long dp[2][MAXN + 1][MAXN + 1];
long long ans[2][MAXN + 1][MAXN + 1];
long long C[MAXN + 1][MAXN + 1];
int main() {
  scanf("%d%d", &n, &k);
  k /= 50;
  int A, B;
  A = B = 0;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    x == 50 ? A++ : B++;
  }
  C[0][0] = 1;
  for (int i = 1; i <= 50; i++)
    for (int j = 0; j <= i; j++)
      C[i][j] = j == 0 ? 1 : (C[i - 1][j - 1] + C[i - 1][j]) % BASE;
  queue<State> q;
  ans[0][A][B] = 1;
  q.push(State(0, A, B, 0));
  memset(dp, 100, sizeof(dp));
  while (!q.empty()) {
    State v = q.front();
    q.pop();
    if (dp[v.p][v.a][v.b] <= v.len) continue;
    dp[v.p][v.a][v.b] = v.len;
    ans[v.p][v.a][v.b] %= BASE;
    long long Ans = ans[v.p][v.a][v.b];
    for (int a = 0; a <= k; a++)
      for (int b = 0; b * 2 <= k - a; b++) {
        if (a + b == 0) continue;
        if (a > v.a) continue;
        if (b > v.b) continue;
        if (dp[1 - v.p][A - v.a + a][B - v.b + b] < v.len + 1) continue;
        ans[1 - v.p][A - v.a + a][B - v.b + b] +=
            ((Ans * C[v.a][a]) % BASE * C[v.b][b]) % BASE;
        q.push(State(1 - v.p, A - v.a + a, B - v.b + b, v.len + 1));
      }
  }
  if (dp[1][A][B] > 1000000) dp[1][A][B] = -1;
  printf("%I64d\n%I64d", dp[1][A][B], ans[1][A][B]);
  return 0;
}
