import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
/**
* 滑动窗口
* 解决问题:解决数组、字符串的连续子区间问题
* 使用条件:每个值都大于0(满足单调性)
*/
/**
* 下面使用scanner速度太慢了,所以采用自定义的方式重新输入
*/
//Scanner in = new Scanner(System.in);
Read in = new Read();
// 注意 hasNext 和 hasNextLine 的区别
int n = in.nextInt();
int x = in.nextInt();
int []a=new int [n+1];
for(int i=1;i<=n;i++){
a[i]=in.nextInt();
}
int l=1,r=1;//遍历的左右下标
int best_l=1;int best_r=1;int min_len=n;
int sum=0;
while(r<=n){
sum+=a[r];
while(sum>=x){
if(r-l+1<min_len){
min_len=r-l+1;
best_l=l;
best_r=r;
}
sum-=a[l++];
}
r++;
}
System.out.println(best_l+" "+best_r);
}
static class Read{
StringTokenizer st=new StringTokenizer("");
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
// 3. 补全 next() 方法:读取一行数据并分割成 token
String next() throws IOException {
// 如果当前 token 用完了,读取下一行并重新分割
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return st.nextToken();
}
// 4. 补全 nextInt() 方法:调用 next() 并转成整数
int nextInt() throws IOException {
return Integer.parseInt(next());
}
}
}