import java.awt.*;
import javax.swing.*;
public class Main{
private static final int displayWidth=600,displayHeight=600;
private static final String windowTitle="IKACHAN IS A RAINBOW!!!";
private static JJPanel panel;
public static void main(String[] args){
JFrame frame=new JFrame(windowTitle);
panel=new JJPanel();
frame.setContentPane(panel);
frame.setVisible(true);
Insets insets=frame.getInsets();
int windowWidth=displayWidth+insets.left+insets.right;
int windowHeight=displayHeight+insets.top+insets.bottom;
frame.setSize(windowWidth,windowHeight);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
class JJPanel extends JPanel{
public static void centerString(Graphics g,String str,int x,int y){
g.drawString(str,x-stringWidth(g,str)/2,y);
}
public static int stringWidth(Graphics g,String str){
return (int)g.getFont().getStringBounds(str,g.getFontMetrics().getFontRenderContext()).getWidth();
}
@Override
public void paint(Graphics g){
g.setColor(Color.black);
g.fillRect(0,0,800,800);
for(int x=0;x<800;x++){
for(int y=0;y<800;y++){
double color=(x+y)/50.0,third=2*Math.PI/3;
g.setColor(new Color((int)(128+127*Math.sin(color)),
(int)(128+127*Math.sin(color+third)),
(int)(128+127*Math.sin(color+2*third))));
boolean draw=false;
int dx=Math.abs(300-x);
if(y<400){
if(dx<150) draw=5*dx+4*y>1000;
if(2*(dx-80)*(dx-80)+(y-250)*(y-250)<900) draw=false;
}else{
for(int i=0;i<3;i++){
int center=150+60*i,rad=102*i+42,maxwidth=6;
double portion=.45-.13*i;
double dx2=(center-dx)/((double)rad),dy=(y-400)/((double)rad);
if(dx2>=1-portion){
double width=maxwidth*(dx2-(1-portion))/portion;
if(Math.abs(Math.sqrt(dx2*dx2+dy*dy)-1.0)<width/rad) draw=true;
}
}
}
if(draw) g.drawLine(x,y,x+1,y);
}
}
g.setColor(Color.white);
Font f;
g.setFont(new Font("Comic Sans MS",Font.BOLD,45));
centerString(g,"Your argument is invalid.",300,580);
}
}