#include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(false);cin.tie(0);
using namespace std;
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define mp make_pair
#define all(a) a.begin(),a.end()
#define bitcnt(x) __builtin_popcountll(x)
#define mod 1000000007
#define PI 3.14159265
#define tot 300005
#define BLOCK 20000
#define MAXN 500005
typedef unsigned long long int uint64;
typedef long long int int64;
int arr[100005];
int64 k;
int n;
int64 sum[100005];
int64 getsum( int r , int l ){
return sum[r]-sum[l]+arr[l];
}
int upper(int idx,int l,int r,int64 req){
if(req<0)
return -1;
int lft=l,rht=r;
int ret=-1;
while(lft<=rht){
int mid=(lft+rht);
mid/=2;
if(getsum(mid,idx)==req){
ret=mid;
lft=mid+1;
}
if(getsum(mid,idx)>req)
rht=mid-1;
if(getsum(mid,idx)<req)
lft=mid+1;
}
return ret;
}
int lower(int idx,int l,int r,int64 req){
if(req<0)
return -1;
int lft=l,rht=r;
int ret=-1;
while(lft<=rht){
int mid=(lft+rht);
mid/=2;
if(getsum(mid,idx)==req){
ret = mid;
rht = mid-1;
}
if(getsum(mid,idx)>req)
rht=mid-1;
if(getsum(mid,idx)<req)
lft=mid+1;
}
return ret;
}
int main(){
freopen("input.txt","r",stdin);
freopen("output1.txt","w",stdout);
cin>>n>>k;
int cnt=0;
for(int i=1;i<=n;i++){
scanf("%d",&arr[i]);
assert(arr[i]>=0);
//assert(arr[i]<=10000000000);
sum[i]=sum[i-1]+arr[i];
cnt++;
}
assert(cnt==n);
int64 ans=0;
int minstep = n;
for(int i=1;i<=n;i++){
int idx1 = upper(i,i,n,k);
int idx2 = lower(i,i,n,k);
if( idx1 != -1 )
ans+=(idx1-idx2+1);
minstep = min( minstep , (i-1)+(n-idx1) );
}
printf("%lld %d\n",ans,minstep);
return 0;
}