#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
const int N = 55;
const int Inf = 1e6;
const int Mod = 1e9 + 7;
int n, k;
int Total1 = 0, Total2 = 0;
int a[N];
int Fact[N];
int iFact[N];
int Dp1[5 * N][N][N];
int Dp2[5 * N][N][N];
void add_self(int& x, int y) {
  if ((x += y) >= Mod) x -= Mod;
}
int mul(int x, int y) { return (long long)x * y % Mod; }
int fp(int x, int y) {
  if (!y) return 1;
  if (y & 1) return mul(x, fp(x, y - 1));
  return fp(mul(x, x), y >> 1);
}
int inv(int y) { return fp(y, Mod - 2); }
int C(int n_, int r_) {
  if (n_ < 0 || r_ < 0 || n_ < r_) return 0;
  return mul(Fact[n_], mul(iFact[r_], iFact[n_ - r_]));
}
void min_self(int& x, int y) { x = min(x, y); }
int Rec1(int rep = 0, int Cnt1 = Total1, int Cnt2 = Total2) {
  if (!Cnt1 && !Cnt2) return rep;
  if (rep == 3 * N - 1) return Inf;
  if (Dp1[rep][Cnt1][Cnt2] + 1) return Dp1[rep][Cnt1][Cnt2];
  int Res = Inf;
  for (int take1 = 0; take1 <= Cnt1; take1++) {
    for (int take2 = 0; take2 <= Cnt2 && 50 * take1 + 100 * take2 <= k;
         take2++) {
      int staff = 0;
      if (take1 != Cnt1 || take2 != Cnt2) {
        staff = Inf;
        int Reach1 = Total1 - Cnt1 + take1;
        int Reach2 = Total2 - Cnt2 + take2;
        if (Reach1 > 0)
          min_self(staff, Rec1(rep + 1, Cnt1 - take1 + 1, Cnt2 - take2));
        if (Reach2 > 0)
          min_self(staff, Rec1(rep + 1, Cnt1 - take1, Cnt2 - take2 + 1));
      }
      min_self(Res, 1 + staff);
    }
  }
  return Dp1[rep][Cnt1][Cnt2] = Res;
}
int Rec2(int rep, int Cnt1 = Total1, int Cnt2 = Total2) {
  if (rep >= 5 * N) return 0;
  if (!Cnt1 && !Cnt2) return !rep;
  if (!rep) return 0;
  if (Dp2[rep][Cnt1][Cnt2] + 1) return Dp2[rep][Cnt1][Cnt2];
  int Res = Dp2[rep][Cnt1][Cnt2] = 0;
  for (int take1 = 0; take1 <= Cnt1 && 50 * take1 <= k; take1++) {
    for (int take2 = 0; take2 <= Cnt2 && 50 * take1 + 100 * take2 <= k;
         take2++) {
      int staff = 0;
      int ways = mul(C(Cnt1, take1), C(Cnt2, take2));
      if (take1 != Cnt1 || take2 != Cnt2) {
        int Reach1 = Total1 - Cnt1 + take1;
        int Reach2 = Total2 - Cnt2 + take2;
        for (int back1 = 0, rep1 = 5;
             back1 <= Reach1 && 50 * back1 <= k && rep1 > 0; back1++) {
          if (Rec1(0, Cnt1 - take1 + back1, Cnt2 - take2) > rep - 1) rep1--;
          for (int back2 = (!back1), rep2 = 5;
               back2 <= Reach2 && 50 * back1 + 100 * back2 <= k && rep2 > 0;
               back2++) {
            if (Rec1(0, Cnt1 - take1 + back1, Cnt2 - take2 + back2) > rep - 1)
              rep2--;
            int ways2 = mul(C(Reach1, back1), C(Reach2, back2));
            add_self(staff,
                     mul(mul(ways, ways2), Rec2(rep - 1, Cnt1 - take1 + back1,
                                                Cnt2 - take2 + back2)));
          }
        }
      } else
        staff = mul(ways, Rec2(rep - 1, Cnt1 - take1, Cnt2 - take2));
      add_self(Res, staff);
    }
  }
  return Dp2[rep][Cnt1][Cnt2] = Res;
}
int main() {
  memset(Dp1, -1, sizeof(Dp1));
  memset(Dp2, -1, sizeof(Dp2));
  Fact[0] = iFact[0] = 1;
  for (int i = 1; i < N; i++)
    Fact[i] = mul(i, Fact[i - 1]), iFact[i] = inv(Fact[i]);
  cin >> n >> k;
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  int Cnt1 = 0, Cnt2 = 0;
  for (int i = 0; i < n; i++)
    if (a[i] == 50)
      Total1++;
    else
      Total2++;
  int Ans1 = Rec1();
  int Ans2 = Rec2(Ans1);
  if (Ans1 >= Inf)
    Ans1 = -1;
  else
    Ans1 = 2 * Ans1 - 1;
  cout << Ans1 << endl;
  cout << Ans2 << endl;
}
