#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 50;
const int MAX_K = 2 * MAX_N + 1;
const long long MODER = 1000000007;
long long inverse(long long a) {
  long long x = 0, y = 1;
  long long u = 1, v = 0, m, n, q, r;
  long long gcd = MODER;
  long long aback = a;
  while (a != 0) {
    q = gcd / a;
    r = gcd % a;
    m = x - u * q;
    n = y - v * q;
    gcd = a;
    a = r;
    x = u;
    y = v;
    u = m;
    v = n;
  }
  if (x < 0) {
    x = x % MODER;
    x = x + MODER;
  } else {
    x = x % MODER;
  }
  return x;
}
long long comb(int n, int k) {
  int m = n - k;
  n = k;
  if (m < n) {
    int tmp = m;
    m = n;
    n = tmp;
  }
  long long ans = 1;
  for (int i = 1; i <= n; ++i) {
    ans = (ans * (m + n - i + 1)) % MODER;
    ans = (ans * inverse(i)) % MODER;
  }
  return ans;
}
long long L[MAX_N + 1][MAX_N + 1][MAX_K];
long long R[MAX_N + 1][MAX_N + 1][MAX_K];
int main() {
  int n, boat;
  scanf("%d%d", &n, &boat);
  boat = boat / 50;
  int count1 = 0, count2 = 0;
  for (int i = 0; i < n; ++i) {
    int w;
    scanf("%d", &w);
    if (w / 50 == 1) {
      ++count1;
    } else if (w / 50 == 2) {
      ++count2;
    }
  }
  for (int i = 0; i <= count1; ++i) {
    for (int j = 0; j <= count2; ++j) {
      for (int k = 0; k < MAX_K; ++k) {
        L[i][j][k] = -1;
        R[i][j][k] = -1;
      }
    }
  }
  L[count1][count2][0] = 1;
  int ans = -1;
  long long kind = 0;
  for (int k = 0; k < MAX_K; ++k) {
    for (int i = 0; i <= count1; ++i) {
      for (int j = 0; j <= count2; ++j) {
        if (L[i][j][k] >= 0) {
          for (int t1 = 0; t1 <= i; ++t1) {
            for (int t2 = 0; t2 <= j; ++t2) {
              if (t1 + t2 * 2 <= boat && (t1 != 0 || t2 != 0)) {
                long long time = (L[i][j][k] * comb(i, t1)) % MODER;
                time = (time * comb(j, t2)) % MODER;
                if (R[i - t1][j - t2][k] >= 0) {
                  R[i - t1][j - t2][k] = (R[i - t1][j - t2][k] + time) % MODER;
                } else {
                  R[i - t1][j - t2][k] = time;
                }
              }
            }
          }
        }
      }
    }
    if (R[0][0][k] >= 0) {
      ans = 2 * k + 1;
      kind = R[0][0][k];
      break;
    }
    for (int i = 0; i <= count1; ++i) {
      for (int j = 0; j <= count2; ++j) {
        if (R[i][j][k] >= 0) {
          for (int t1 = 0; t1 <= count1 - i; ++t1) {
            for (int t2 = 0; t2 <= count2 - j; ++t2) {
              if (t1 + t2 * 2 <= boat && (t1 != 0 || t2 != 0)) {
                long long time = (R[i][j][k] * comb(count1 - i, t1)) % MODER;
                time = (time * comb(count2 - j, t2)) % MODER;
                if (L[i + t1][j + t2][k + 1] >= 0) {
                  L[i + t1][j + t2][k + 1] =
                      (L[i + t1][j + t2][k + 1] + time) % MODER;
                } else {
                  L[i + t1][j + t2][k + 1] = time;
                }
              }
            }
          }
        }
      }
    }
  }
  printf("%d\n", ans);
  printf("%d\n", static_cast<int>(kind));
  return 0;
}
