    public class Input { 
    public static double Ja, Jb, Jc, Jd, 
x1 = 130 , 
x2 = 170 , 
x3 = 180 , 
x4 = -43 , 
                              x5, x6, x7, x8, x9

    ; 
    public static String[] points = { 
                 "A" ,  "B" ,  "C" ,  "P" ,  "D" ,  "Q" ,  "R"

}; 
    public static int[] gPoint = {2} ; 
    public static int[] yPoint = {0, 1, 3, 4} ; 
    public static int[] rPoint = {5, 6} ; 
    public static String[] freeVar = 
                       {"_x1" , "_x2" , "_x3" , "_x4" }

; 
    public static int[] cooX = { 
                       -130, 130, 170, -43, -43, 65, 184

}; 
    public static int[] cooY = { 
                          0, 0, 180, 0, 297, 117, 246

}; 
                       public static String[][] coor = {

{ "_x1"  , "_0"  }, 
{ "_x1"  , "_0"  }, 
{ "_x2"  , "_x3"  }, 
{ "_x4"  , "_0"  }, 
{ "_x4"  , "_x5"  }, 
{ "_x6"  , "_x7"  }, 
{ "_x8"  , "_x9"  } } ; 
public static int[][] relLine = {{1, 6}, {4, 6}, {5, 7}, {6, 7}, {2, 7},

    {1, 2}, {1, 3}, {2, 3}, {1, 4}, {4, 5}, {5, 6}}

; 
                      public static int[][] relCir2 = {}

; 
                  public static int[][] relCir3 = {{1, 2, 3}}

; 
    public static int[] center = { 
                                    47, 120

}; 
  
    public static int centerX() { return center[0]; } 
    public static int centerY() { return center[1]; } 
    public static int pointNo() { return points.length; } 
    public static int greenPointNo() { return gPoint.length; } 
    public static int yellowPointNo() { return yPoint.length; } 
    public static int redPointNo() { return rPoint.length; } 
    public static int lineNo() { return relLine.length; } 
    public static int circle2No() { return relCir2.length; } 
    public static int circle3No() { return relCir3.length; } 
    public static String point(int i) { return points[i]; } 
    public static int greenPoint(int i) { return gPoint[i]; } 
    public static int yellowPoint(int i) { return yPoint[i]; } 
    public static int redPoint(int i) { return rPoint[i]; } 
    public static int coordinateX(int i) { return cooX[i]; } 
    public static int coordinateY(int i) { return cooY[i]; } 
    public static int relationLine(int i, int j) { return relLine[i][j]; } 
    public static int relationCircle2(int i, int j) { return relCir2[i][j]; } 
    public static int relationCircle3(int i, int j) { return relCir3[i][j]; } 
    public static double getCoo(int Jp, int Jq, int Jx, int Jy, int Ji, int Jz, int Jw, int Ju, int Jv) { 
if ( Ji == 0 ) {  x1 = Jx / ( -1 ) ; 
} 
if ( Ji == 1 ) {  x1 = Jx ; 
} 
if ( Ji == 2 ) {  x2 = Jx ; 
x3 = Jy ; } 
if ( Ji == 3 ) {  x4 = Jx ; 
} 
if ( Ji == 4 ) {  x4 = Jx ; 
} 
Jd = Mpow(-Mpow(x1,2)+Mpow(x2,2)+Mpow(x3,2),2)+4*x3*(Mpow(x1,2)*x3-Mpow(x4,2)*x3) ; 
if ( Ji == 0 & Jd < 0) {  x1 = Ju / ( -1 ) ; 
} 
if ( Ji == 1 & Jd < 0) {  x1 = Ju ; 
} 
if ( Ji == 2 & Jd < 0) {  x2 = Ju ; 
x3 = Jv ; } 
if ( Ji == 3 & Jd < 0) {  x4 = Ju ; 
} 
if ( Ji == 4 & Jd < 0) {  x4 = Ju ; 
} 
if ( Jp == 0 & Jq == 0 ) { return -x1 ; } 
if ( Jp == 1 & Jq == 0 ) { return x1 ; } 
if ( Jp == 2 & Jq == 0 ) { return x2 ; } 
if ( Jp == 2 & Jq == 1 ) { return x3 ; } 
if ( Jp == 3 & Jq == 0 ) { return x4 ; } 
if ( Jp == 4 & Jq == 0 ) { return x4 ; } 
if ( Jp == 4 & Jq == 1 ) { 
Ja = -x3 ; 
Jb = -Mpow(x1,2)+Mpow(x2,2)+Mpow(x3,2) ; 
Jc = Mpow(x1,2)*x3-Mpow(x4,2)*x3 ; 
Jd = Math.pow(Jb,2)-4*Ja*Jc ; 
Ja = 2*Ja ; 
Jb = -Jb/Ja ; 
if (Ji == Jp)  if ((Jw > Jb & Ja > 0) || (Jw < Jb & Ja < 0)) 
x5 = Jb + Math.sqrt(Jd)/Ja ; 
else x5 = Jb - Math.sqrt(Jd)/Ja ; 
else if (Math.abs(Jb-Math.sqrt(Jd)/Ja-Jz)<Math.abs(Jb+Math.sqrt(Jd)/Ja-Jz)) 
x5 = Jb - Math.sqrt(Jd)/Ja ; 
else x5 = Jb + Math.sqrt(Jd)/Ja ; 
return x5 ; } 
if ( Jp == 5 & Jq == 0 ) { 
x6 = 
( -Mpow(x3,2)*x1+x4*Mpow(x2,2)+2*x4*x2*x1+x4*Mpow(x1,2)+x3*x5*x2+x3*x5*x1 ) / 
( Mpow(x3,2)+Mpow(x2,2)+2*x2*x1+Mpow(x1,2) ) ; 
return x6 ; } 
if ( Jp == 5 & Jq == 1 ) { 
x7 = 
( x5*Mpow(x3,2)+x3*x4*x2+x3*x4*x1+x3*x1*x2+Mpow(x1,2)*x3 ) / 
( Mpow(x3,2)+Mpow(x2,2)+2*x2*x1+Mpow(x1,2) ) ; 
return x7 ; } 
if ( Jp == 6 & Jq == 0 ) { 
x8 = 
( -Mpow(x3,2)*x1-x4*Mpow(x2,2)+2*x4*x2*x1-x4*Mpow(x1,2)-x3*x5*x2+x3*x5*x1 ) / 
( -Mpow(x3,2)-Mpow(x2,2)+2*x2*x1-Mpow(x1,2) ) ; 
return x8 ; } 
if ( Jp == 6 & Jq == 1 ) { 
x9 = 
( -x5*Mpow(x3,2)-x3*x4*x2+x3*x4*x1+x3*x1*x2-Mpow(x1,2)*x3 ) / 
( -Mpow(x3,2)-Mpow(x2,2)+2*x2*x1-Mpow(x1,2) ) ; 
return x9 ; } 
    return Jz ; 
} 
    public static boolean free(int i, int c) { 
        for (int j=0; j<freeVar.length; j++) { 
            if (coor[i][c].equals(freeVar[j])) {return true;} 
        } 
        return false; 
    } 
    public static double Mpow(double x, int y) { return Math.pow(x, y); } 
} 
