#include <bits/stdc++.h>
using namespace std;
template <class F, class T>
T convert(F a, int p = -1) {
  stringstream ss;
  if (p >= 0) ss << fixed << setprecision(p);
  ss << a;
  T r;
  ss >> r;
  return r;
}
template <class T>
T gcd(T a, T b) {
  T r;
  while (b != 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T cube(T x) {
  return x * x * x;
}
template <class T>
int getbit(T s, int i) {
  return (s >> i) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return s == 0 ? 0 : cntbit(s >> 1) + (s & 1);
}
const int bfsz = 1 << 16;
char bf[bfsz + 5];
int rsz = 0;
int ptr = 0;
char gc() {
  if (rsz <= 0) {
    ptr = 0;
    rsz = (int)fread(bf, 1, bfsz, stdin);
    if (rsz <= 0) return EOF;
  }
  --rsz;
  return bf[ptr++];
}
void ga(char &c) {
  c = EOF;
  while (!isalpha(c)) c = gc();
}
int gs(char s[]) {
  int l = 0;
  char c = gc();
  while (isspace(c)) c = gc();
  while (c != EOF && !isspace(c)) {
    s[l++] = c;
    c = gc();
  }
  s[l] = '\0';
  return l;
}
template <class T>
bool gi(T &v) {
  v = 0;
  char c = gc();
  while (c != EOF && c != '-' && !isdigit(c)) c = gc();
  if (c == EOF) return false;
  bool neg = c == '-';
  if (neg) c = gc();
  while (isdigit(c)) {
    v = v * 10 + c - '0';
    c = gc();
  }
  if (neg) v = -v;
  return true;
}
long long d[55][55][2], f[55][55][2], C[55][55];
int n, k, a, b, x;
struct triple {
  int x, y, z;
  triple(){};
  triple(int _x, int _y, int _z) {
    x = _x;
    y = _y;
    z = _z;
  }
  bool operator<(const triple &P) const { return x < P.x; }
};
int main() {
  a = 0;
  b = 0;
  cin >> n >> k;
  k /= 50;
  for (int i = (1); i <= (n); ++i) {
    cin >> x;
    if (x / 50 == 1)
      a++;
    else
      b++;
  }
  memset(C, 0, sizeof(C));
  for (int i = 0; i < (55); ++i) C[0][i] = 1;
  for (int i = (1); i <= (50); ++i)
    for (int j = (1); j <= (i); ++j)
      C[j][i] = (C[j - 1][i - 1] + C[j][i - 1]) % 1000000007;
  memset(d, 0x3f, sizeof(d));
  memset(f, 0, sizeof(f));
  d[0][0][1] = 0;
  f[0][0][1] = 1;
  priority_queue<pair<int, triple> > que;
  que.push(make_pair(0, triple(0, 0, 1)));
  while (!que.empty()) {
    int c = -que.top().first, u = que.top().second.x, v = que.top().second.y,
        t = que.top().second.z;
    que.pop();
    if (d[u][v][t] != c) continue;
    if (u == a && v == b && t == 0) break;
    if (t) {
      for (int i = (0); i <= (a - u); ++i)
        for (int j = (0); j <= (b - v); ++j)
          if (i + j + j <= k && i + j > 0) {
            if (d[u + i][v + j][0] > c + 1) {
              d[u + i][v + j][0] = c + 1;
              f[u + i][v + j][0] = (f[u][v][t] * C[i][u + i]) % 1000000007 *
                                   (C[j][v + j]) % 1000000007;
              que.push(make_pair(-c - 1, triple(u + i, v + j, 0)));
            } else if (d[u + i][v + j][0] == c + 1) {
              f[u + i][v + j][0] = (f[u + i][v + j][0] +
                                    (f[u][v][t] * C[i][u + i]) % 1000000007 *
                                        (C[j][v + j]) % 1000000007) %
                                   1000000007;
            }
          }
    } else {
      for (int i = (0); i <= (u); ++i)
        for (int j = (0); j <= (v); ++j)
          if (i + j + j <= k && i + j > 0) {
            if (d[u - i][v - j][1] > c + 1) {
              d[u - i][v - j][1] = c + 1;
              f[u - i][v - j][1] = f[u][v][t] * C[i][a - u + i] % 1000000007 *
                                   C[j][b - v + j] % 1000000007;
              que.push(make_pair(-c - 1, triple(u - i, v - j, 1)));
            } else if (d[u - i][v - j][1] == c + 1) {
              f[u - i][v - j][1] =
                  (f[u - i][v - j][1] + f[u][v][t] * C[i][a - u + i] %
                                            1000000007 * C[j][b - v + j]) %
                  1000000007;
            }
          }
    }
  }
  if (d[a][b][0] < (int)(1e9) + 5) {
    cout << d[a][b][0] << endl;
    cout << f[a][b][0] << endl;
  } else {
    cout << -1 << endl << 0 << endl;
  }
  return 0;
}
