#include <bits/stdc++.h>
using namespace std;
int d[2][51][51];
long long a[2][51][51];
bool iv[2][51][51];
struct que {
  int a1, a2, b;
} q[5500];
long long c(int a, int b) {
  if (b > a / 2) b = a - b;
  if (!b) return 1;
  long long res = 1;
  for (int i = a - b + 1; i <= a; ++i) res *= i;
  for (int i = 1; i <= b; ++i) res /= i;
  res %= 1000000007;
  return res;
}
int main() {
  int n, n1 = 0, n2 = 0, k, x, be, en, a1, a2;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &x);
    if (x == 50)
      ++n1;
    else
      ++n2;
  }
  n = k / 50;
  be = 0;
  en = 1;
  a[0][n1][n2] = 1;
  q[0].a1 = n1;
  q[0].a2 = n2;
  q[0].b = 0;
  while (be != en) {
    a1 = q[be].a1;
    a2 = q[be].a2;
    x = q[be].b;
    ++be;
    if (x) {
      for (int i = 0; i <= n && i <= n1 - a1; ++i)
        for (int j = 0; j * 2 + i <= n && j <= n2 - a2; ++j)
          if ((i + j) && (!iv[0][a1 + i][a2 + j])) {
            iv[0][a1 + i][a2 + j] = true;
            d[0][a1 + i][a2 + j] = d[1][a1][a2] + 1;
            a[0][a1 + i][a2 + j] = a[1][a1][a2] * c(n1 - a1, i) % 1000000007 *
                                   c(n2 - a2, j) % 1000000007;
            q[en].a1 = a1 + i;
            q[en].a2 = a2 + j;
            q[en].b = 0;
            ++en;
          } else if (d[0][a1 + i][a2 + j] == d[1][a1][a2] + 1) {
            a[0][a1 + i][a2 + j] += a[1][a1][a2] * c(n1 - a1, i) % 1000000007 *
                                    c(n2 - a2, j) % 1000000007;
          }
    } else {
      for (int i = 0; i <= n && i <= a1; ++i)
        for (int j = 0; j * 2 + i <= n && j <= a2; ++j)
          if ((i + j) && (!iv[1][a1 - i][a2 - j])) {
            iv[1][a1 - i][a2 - j] = true;
            d[1][a1 - i][a2 - j] = d[0][a1][a2] + 1;
            a[1][a1 - i][a2 - j] =
                a[0][a1][a2] * c(a1, i) % 1000000007 * c(a2, j) % 1000000007;
            q[en].a1 = a1 - i;
            q[en].a2 = a2 - j;
            q[en].b = 1;
            ++en;
          } else if (d[1][a1 - i][a2 - j] == d[0][a1][a2] + 1) {
            a[1][a1 - i][a2 - j] +=
                a[0][a1][a2] * c(a1, i) % 1000000007 * c(a2, j) % 1000000007;
          }
    }
  }
  if (d[1][0][0])
    printf("%d\n%I64d\n", d[1][0][0], a[1][0][0] % 1000000007);
  else
    printf("-1\n0\n");
}
