#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
template <class T>
T Abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
long long Pow(long long B, long long P) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) R = (R * B);
    P /= 2;
    B = (B * B);
  }
  return R;
}
long long BigMod(long long B, long long P, long long M) {
  long long R = 1;
  while (P > 0) {
    if (P % 2 == 1) {
      R = (R * B) % M;
    }
    P /= 2;
    B = (B * B) % M;
  }
  return R;
}
long long dp[2][55][55];
long long cnt[2][55][55];
long long ncr[55][55];
long long mod = 1000000007LL;
struct data {
  int typ, p1, p2;
  data(int a, int b, int c) {
    typ = a;
    p1 = b;
    p2 = c;
  }
};
void process(int capacity, int fifty_kg, int hundred_kg) {
  for (int i = 0; i <= 50; i++) ncr[i][0] = 1LL;
  for (int i = 1; i < 50; i++)
    for (int j = 1; j <= i; j++) {
      ncr[i][j] = (ncr[i - 1][j] % mod + ncr[i - 1][j - 1] % mod) % mod;
    }
  for (int i = 0; i <= 50; i++)
    for (int j = 0; j <= 50; j++)
      dp[0][i][j] = (1LL << 55), dp[1][i][j] = (1LL << 55);
  dp[0][fifty_kg][hundred_kg] = 0;
  cnt[0][fifty_kg][hundred_kg] = 1;
  queue<data> Q;
  Q.push(data(0, fifty_kg, hundred_kg));
  int left_p1, left_p2;
  int typ, p1, p2;
  while (!Q.empty()) {
    typ = Q.front().typ;
    p1 = Q.front().p1;
    p2 = Q.front().p2;
    Q.pop();
    if (typ == 1 && p1 == fifty_kg && p2 == hundred_kg) break;
    left_p1 = fifty_kg - p1;
    left_p2 = hundred_kg - p2;
    long long &ret = dp[typ][p1][p2];
    long long &ccc = cnt[typ][p1][p2];
    for (int i = 0; i <= p1; i++)
      for (int j = 0; j <= p2; j++) {
        if ((i * 50 + j * 100) > capacity) continue;
        if (!(i + j)) continue;
        if (dp[!typ][left_p1 + i][left_p2 + j] > ret + 1) {
          dp[!typ][left_p1 + i][left_p2 + j] = ret + 1;
          Q.push(data(!typ, left_p1 + i, left_p2 + j));
        }
        if (dp[!typ][left_p1 + i][left_p2 + j] == ret + 1) {
          cnt[!typ][left_p1 + i][left_p2 + j] =
              (cnt[!typ][left_p1 + i][left_p2 + j] +
               ccc * ncr[p1][i] * ncr[p2][j]) %
              mod;
        }
      }
  }
  return;
}
int main() {
  int fifty = 0, hundred = 0;
  int n, cap, val;
  scanf("%d %d", &n, &cap);
  for (int i = 0; i < n; i++) {
    scanf("%d", &val);
    if (val == 50)
      fifty++;
    else
      hundred++;
  }
  process(cap, fifty, hundred);
  if (dp[1][fifty][hundred] < (1LL << 55))
    cout << dp[1][fifty][hundred] << endl << cnt[1][fifty][hundred] << endl;
  else
    cout << "-1\n0\n";
  return 0;
}
