#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<long long, pair<long long, long long> >,
               vector<pair<long long, pair<long long, long long> > >,
               greater<pair<long long, pair<long long, long long> > > >
    pq;
map<pair<long long, long long>, int> mp;
long long ans = 0;
long long dp[51][51][2][210];
long long NCR[51][51];
int N, M;
int A[51];
long long fmod(long long a) {
  if (a >= 0 && a < 1000000007) return a;
  a %= 1000000007;
  if (a < 0) a += 1000000007;
  return a;
}
void init() {
  int i, j;
  for (j = 0; j < 51; j++) {
    NCR[0][j] = 0;
  }
  for (i = 0; i < 51; i++) {
    NCR[i][0] = 1;
  }
  for (i = 1; i < 51; i++) {
    for (j = 1; j < 51; j++) {
      NCR[i][j] = NCR[i - 1][j - 1] + NCR[i - 1][j];
      NCR[i][j] %= 1000000007;
    }
  }
}
void doIt() {
  int fifty = 0;
  int hundred = 0;
  for (int i = 0; i < N; i++)
    if (A[i] == 50)
      fifty++;
    else
      hundred++;
  memset(dp, 0, sizeof(dp));
  dp[0][0][1][0] = dp[fifty][hundred][0][0] = 1;
  for (int step = 1; step <= 209; step++) {
    for (int fif = 0; fif <= fifty; fif++) {
      for (int one = 0; one <= hundred; one++) {
        for (int transferfif = 0; transferfif <= fif; transferfif++) {
          for (int transferhun = 0; transferhun <= one; transferhun++) {
            if (transferfif * 50 + transferhun * 100 > M ||
                transferfif + transferhun == 0)
              continue;
            if (fif == 0 && one == 0) {
            }
            if (step % 2) {
              dp[fif][one][1][step] +=
                  fmod(dp[fifty - fif + transferfif]
                         [hundred - one + transferhun][0][step - 1] *
                       fmod(NCR[fifty - fif + transferfif][transferfif] *
                            NCR[hundred - one + transferhun][transferhun]));
              dp[fif][one][1][step] = fmod(dp[fif][one][1][step]);
            } else {
              dp[fif][one][0][step] +=
                  fmod(dp[fifty - fif + transferfif]
                         [hundred - one + transferhun][1][step - 1] *
                       fmod(NCR[fifty - fif + transferfif][transferfif] *
                            NCR[hundred - one + transferhun][transferhun]));
              dp[fif][one][0][step] = fmod(dp[fif][one][0][step]);
            }
          }
        }
      }
    }
  }
  for (int i = 1; i <= 209; i += 2) {
    if (dp[fifty][hundred][1][i] > 0) {
      printf("%d\n%lld\n", i, dp[fifty][hundred][1][i]);
      return;
    }
  }
  printf("-1\n0\n");
  return;
}
int main() {
  init();
  scanf("%d%d", &N, &M);
  for (int i = 0; i < N; i++) scanf("%d", A + i);
  doIt();
  return 0;
}
