import std.stdio, std.conv, std.string, std.bigint; import std.math, std.random, std.datetime; import std.array, std.range, std.algorithm, std.container, std.format; string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; } void main(){ int x = read.to!int; int y = read.to!int; int[] qs; for(int a = 0; a <= y; a ++){ qs ~= a * a; } int[] count; for(int r = 0; r <= y; r ++){ count ~= 0; } int bmax = y; for(int a = 0; qs[a] <= y; a ++){ int r; for(int b = 1; qs[b] <= y; b ++){ r = qs[a] + qs[b]; if(r > y) break; count[r] += 1; } } int countmax = 0; for(int r = x; r <= y; r ++){ if(count[r] > countmax) countmax = count[r]; } (countmax * 4).writeln; }