#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:255000000")
bool firstout = 1;
template <class T>
T &minn(T &a, T b) {
  if (b < a) a = b;
  return a;
}
template <class T>
T &maxx(T &a, T b) {
  if (a < b) a = b;
  return a;
}
int &madd(int &a, int b) {
  a += b;
  if (a >= 1000000007) a -= 1000000007;
  return a;
}
int &msub(int &a, int b) {
  a -= b;
  if (a < 0) a += 1000000007;
  return a;
}
int &mmult(int &a, int b) { return a = (long long)a * b % 1000000007; }
int mdiv(long long a, long long b, long long m) {
  a = (a % m + m) % m;
  b = (b % m + m) % m;
  if (a % b == 0) return a / b;
  return (a + m * mdiv(-a, m, b)) / b;
}
int n, m, q;
int C[55][55];
int D[55][55][2];
int DD[55][55][2];
int lq, rq;
pair<pair<int, int>, int> Q[55 * 55 * 2];
void bfs() {
  int i, j, k;
  for (i = (0); i < (n + 1); ++i)
    for (j = (0); j < (m + 1); ++j)
      for (k = (0); k < (2); ++k) D[i][j][k] = 1012345678, DD[i][j][k] = 0;
  D[0][0][1] = 0;
  DD[0][0][1] = 1;
  lq = rq = 0;
  Q[rq++] = make_pair(make_pair(0, 0), 1);
  for (; lq < rq; ++lq) {
    int nn = Q[lq].first.first;
    int mm = Q[lq].first.second;
    int p = Q[lq].second;
    int a = D[nn][mm][p] + 1;
    int x = DD[nn][mm][p];
    if (p) nn = n - nn, mm = m - mm;
    for (i = (0); i < (nn + 1); ++i)
      for (j = (0); j < (mm + 1); ++j)
        if ((i || j) && i + j + j <= q) {
          int pn = nn - i;
          int pm = mm - j;
          if (p) pn = n - pn, pm = m - pm;
          int &res = D[pn][pm][!p];
          if (res >= a)
            madd(DD[pn][pm][!p],
                 (long long)C[nn][i] * C[mm][j] % 1000000007 * x % 1000000007);
          if (res > a) {
            res = a;
            Q[rq++] = make_pair(make_pair(pn, pm), !p);
          }
        }
  }
}
int main() {
  int i, j, k;
  char c;
  int a, d;
  for (i = (0); i < (55); ++i)
    for (j = (0); j < (i + 1); ++j)
      if (j == 0 || j == i)
        C[i][j] = 1;
      else
        madd(C[i][j] = C[i - 1][j - 1], C[i - 1][j]);
  int ts;
  for (ts = 1; scanf("%"
                     "d",
                     &(n)) > 0;
       ++ts) {
    scanf(
        "%"
        "d",
        &(q));
    q /= 50;
    int nn = 0;
    m = 0;
    for (i = (0); i < (n); ++i) {
      scanf(
          "%"
          "d",
          &(a));
      a /= 50;
      if (a == 1)
        ++nn;
      else
        ++m;
    }
    n = nn;
    for (i = (0); i < (n + 1); ++i)
      for (j = (0); j < (m + 1); ++j)
        for (k = (0); k < (2); ++k) D[i][j][k] = DD[i][j][k] = -1;
    bfs();
    int res = D[n][m][0];
    if (res == 1012345678)
      printf(
          "%"
          "d",
          (-1)),
          printf("\n"), firstout = 1,
                        printf(
                            "%"
                            "d",
                            (0)),
                        printf("\n"), firstout = 1;
    else {
      printf(
          "%"
          "d",
          (res));
      printf("\n"), firstout = 1;
      res = DD[n][m][0];
      printf(
          "%"
          "d",
          (res));
      printf("\n"), firstout = 1;
    }
  }
  return 0;
}
