#include <bits/stdc++.h>
using namespace std;
struct ss {
  int one, two;
  bool sd;
  ss() {}
  ss(int o, int t, bool s) { one = o, two = t, sd = s; }
};
pair<int, int> dp[56][56][2];
queue<ss> Q;
int nCr[56][56];
void gen_nCr() {
  int i, j;
  nCr[0][0] = 1;
  for (i = 1; i < 56; ++i) nCr[i][1] = i, nCr[i][0] = nCr[i][i] = 1;
  for (i = 2; i < 56; ++i) {
    for (j = 2; j < i; ++j)
      nCr[i][j] = (nCr[i - 1][j] + nCr[i - 1][j - 1]) % 1000000007;
  }
}
void update(int one, int two, bool sd, pair<int, int> u, queue<ss> &Q, int m) {
  int l = u.first + 1, w = u.second;
  w = ((long long)w * m) % 1000000007;
  pair<int, int> &now = dp[one][two][sd];
  if (now.first > l) {
    now.first = l;
    now.second = w;
    Q.push(ss(one, two, sd));
  } else if (now.first == l)
    now.second = (now.second + w) % 1000000007;
}
pair<int, int> bfs(int ONE, int TWO, int cap) {
  while (!Q.empty()) Q.pop();
  Q.push(ss(ONE, TWO, 0));
  int n = ONE + TWO, i, j;
  ss now;
  bool sd;
  int one = ONE, two = TWO, o, t;
  for (i = 0; i <= ONE; ++i) {
    for (j = 0; j <= TWO; ++j)
      dp[i][j][0].first = dp[i][j][1].first = 100000000;
  }
  dp[one][two][0] = make_pair(0, 1);
  while (!Q.empty()) {
    now = Q.front();
    Q.pop();
    one = now.one, two = now.two, sd = now.sd;
    if (sd == 1 && one + two == 0) return dp[one][two][1];
    if (sd == 0) {
      for (o = 0; o <= one; ++o) {
        if (o > cap) break;
        for (t = 0; t <= two; ++t) {
          if (o + t == 0) continue;
          if (o + t * 2 > cap) break;
          update(one - o, two - t, 1, dp[one][two][0], Q,
                 ((long long)nCr[one][o] * nCr[two][t]) % 1000000007);
        }
      }
    } else {
      for (o = 0; o + one <= ONE; ++o) {
        if (o > cap) break;
        for (t = 0; t + two <= TWO; ++t) {
          if (o + t == 0) continue;
          if (o + t * 2 > cap) break;
          update(
              one + o, two + t, 0, dp[one][two][1], Q,
              ((long long)nCr[ONE - one][o] * nCr[TWO - two][t]) % 1000000007);
        }
      }
    }
  }
  return make_pair(-1, 0);
}
int main() {
  gen_nCr();
  int N, K, x, one, two;
  pair<int, int> ans;
  while (scanf("%d %d", &N, &K) != EOF) {
    one = two = 0;
    while (N--) {
      scanf("%d", &x);
      x /= 50;
      if (x == 1)
        ++one;
      else
        ++two;
    }
    K /= 50;
    ans = bfs(one, two, K);
    printf("%d\n%d\n", ans.first, ans.second);
  }
  return 0;
}
