1.

/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, WS09
* Problem: 294 Divisors
* Link:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=230
*
* @author Kratzer Kevin
* @version 1.0, 10/21/2009
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.168
*/

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;

public class Main294 {

protected final BufferedReader input;
protected final BufferedWriter out;
public Main294() {
input = new BufferedReader(new InputStreamReader(System.in));
out = new BufferedWriter(new OutputStreamWriter(System.out));
}

void process() throws IOException {
String line = input.readLine();
int amount = Integer.parseInt(line);
for (int i = 0; i < amount; i++) {
line = input.readLine();
String[] splitLine = line.split(" ");
int min = Integer.parseInt(splitLine[0]);
int max = Integer.parseInt(splitLine[1]);
int maxDiv = 0;
int maxNr = min;
for(; min <= max; min++) {
int N = min;
int T=1;
int nr = 0;
while(N%2==0) {
nr++;
N /= 2;
}
T *= nr + 1;
for(int j=3; j <= Math.sqrt(N);j += 2) {
nr = 0;
while(N%j==0) {
nr++;
N /= j;
}
T *= (nr+1);
}

if(N>1) {
T *= 2;
}
if(maxDiv < T) {
maxDiv = T;
maxNr = min;
}
}


out.append("Between " + splitLine[0] + " and " + splitLine[1] + ", " + maxNr + " has a maximum of " + maxDiv + " divisors.\n");
}
out.flush();

}

public static void main(String... args) throws Exception {
new Main294().process();
}
}