import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
class Main {
private void doIt
(String fileName
) { try {
bi
= ImageIO.
read(new File(fileName
)); int width = bi.getWidth();
int height = bi.getHeight();
for(int x=0; x<width; x++) {
for(int y=0; y<height; y++) {
int argb = bi.getRGB(x, y);
int a = (argb >>> 24) & 0xff;
int r = (argb >>> 16) & 0xff;
int g = (argb >>> 8) & 0xff;
int b = argb & 0xff;
if(r == 0xff && g == 0 && b == 0) {
System.
out.
printf("%d, %d%n", x, y
); }
}
}
ex.printStackTrace();
}
}
public static void main
(String[] args
) { new Main().doIt(args[0]);
}
}
aW1wb3J0IGphdmEuYXd0Lio7CmltcG9ydCBqYXZhLmF3dC5pbWFnZS4qOwppbXBvcnQgamF2YS5pby4qOwppbXBvcnQgamF2YXguaW1hZ2Vpby4qOwoKY2xhc3MgTWFpbiB7CiAgICBwcml2YXRlIHZvaWQgZG9JdChTdHJpbmcgZmlsZU5hbWUpIHsKICAgICAgICBCdWZmZXJlZEltYWdlIGJpID0gbnVsbDsKICAgICAgICB0cnkgewogICAgICAgICAgICBiaSA9IEltYWdlSU8ucmVhZChuZXcgRmlsZShmaWxlTmFtZSkpOwogICAgICAgICAgICBpbnQgd2lkdGggPSBiaS5nZXRXaWR0aCgpOwogICAgICAgICAgICBpbnQgaGVpZ2h0ID0gYmkuZ2V0SGVpZ2h0KCk7CiAgICAgICAgICAgIGZvcihpbnQgeD0wOyB4PHdpZHRoOyB4KyspIHsKICAgICAgICAgICAgICAgIGZvcihpbnQgeT0wOyB5PGhlaWdodDsgeSsrKSB7CiAgICAgICAgICAgICAgICAgICAgaW50IGFyZ2IgPSBiaS5nZXRSR0IoeCwgeSk7CiAgICAgICAgICAgICAgICAgICAgaW50IGEgICAgPSAoYXJnYiA+Pj4gMjQpICYgMHhmZjsKICAgICAgICAgICAgICAgICAgICBpbnQgciAgICA9IChhcmdiID4+PiAxNikgJiAweGZmOwogICAgICAgICAgICAgICAgICAgIGludCBnICAgID0gKGFyZ2IgPj4+ICA4KSAmIDB4ZmY7CiAgICAgICAgICAgICAgICAgICAgaW50IGIgICAgPSBhcmdiICAgICAgICAgICYgMHhmZjsKICAgICAgICAgICAgICAgICAgICBpZihyID09IDB4ZmYgJiYgZyA9PSAwICYmIGIgPT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50ZigiJWQsICVkJW4iLCB4LCB5KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9IGNhdGNoKElPRXhjZXB0aW9uIGV4KSB7CiAgICAgICAgICAgIGV4LnByaW50U3RhY2tUcmFjZSgpOwogICAgICAgIH0KICAgIH0KCiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CiAgICAgICAgbmV3IE1haW4oKS5kb0l0KGFyZ3NbMF0pOwogICAgfQp9