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[int] count; for(int a = 0; a * a <= y; a ++){ for(int b = 1; b * b <= y; b ++){ int r = a * a + b * b; if(r > y) break; if(r in count) count[r] += 1; else count[r] = 1; } } int countmax = 0; for(int r = x; r <= y; r ++){ if(r in count && count[r] > countmax) countmax = count[r]; } (countmax * 4).writeln; }