#include <bits/stdc++.h>
using namespace std;
long long dp[2][210][51][51];
long long C[51][51];
int main() {
  C[0][0] = 1;
  C[1][0] = C[1][1] = 1;
  for (int i = 2; i <= 50; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= 50; j++)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % 1000000007;
  }
  int n, K;
  scanf("%d%d", &n, &K);
  int a = 0, b = 0;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    if (x == 50)
      a++;
    else
      b++;
  }
  dp[0][0][a][b] = 1;
  int now = 1;
  for (int i = 1; i <= 205; i++) {
    for (int j = 0; j <= a; j++) {
      for (int k = 0; k <= b; k++) {
        if (dp[now ^ 1][i - 1][j][k] == 0) continue;
        for (int jj = 0; jj <= j; jj++) {
          if (jj * 50 > K) break;
          for (int kk = 0; kk <= k; kk++) {
            if (jj == 0 && kk == 0) continue;
            if (jj * 50 + kk * 100 > K) break;
            dp[now][i][a - (j - jj)][b - (k - kk)] =
                ((dp[now ^ 1][i - 1][j][k] *
                  (C[j][jj] * C[k][kk] % 1000000007)) %
                     1000000007 +
                 dp[now][i][a - (j - jj)][b - (k - kk)]) %
                1000000007;
          }
        }
      }
    }
    if (now == 1 && dp[now][i][a][b] != 0) break;
    now ^= 1;
  }
  int can = 0;
  for (int i = 1; i <= 205; i++) {
    if (dp[1][i][a][b] != 0) {
      can = 1;
      printf("%d\n", i);
      printf("%I64d\n", dp[1][i][a][b] % 1000000007);
      break;
    }
  }
  if (!can) {
    puts("-1");
    puts("0");
  }
}
