#include <stdio.h>
#include <cmath>
#include <iostream>
using namespace std;
int main(){
long long n,m;
cin>>n>>m;
for(int y=sqrt(2*m);y>0;y--){
int x=2*m/y;
if(x*y==2*m){
if(x+y&1){
long long a=x-y+1>>1;
long long b=x+y-1>>1;
printf("[%d,%d]\n",a,b);
}
}
}
return 0;
}