using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Threading;
public class Check {
double E = 1e-4;
public struct TPoint
{
public double x, y;
}
TPoint GetVector(TPoint p1, TPoint p2)
{
TPoint tvector;
tvector.x =p2.x-p1.x;
tvector.y =p2.y-p1.y;
return tvector;
}
double scamul(TPoint v1, TPoint v2)
{
return v1.x * v2.x + v1.y * v2.y;
}
bool PointEquil(TPoint A, TPoint B)
{
return (Math.Abs(A.x - B.x) < E && Math.Abs(A.y - B.y) < E);
}
public string Execute()
{
try{
CultureInfo culture;
culture = CultureInfo.CreateSpecificCulture("en-US");
Thread.CurrentThread.CurrentCulture = culture;
List<string> output = new List<string>();
using (System.IO.StringReader reader = new System.IO.StringReader("{1}"))
{
string line;
while ((line = reader.ReadLine()) != null)
{
output.Add(line.Trim());
}
}
List<string> ouf = new List<string>();
using (System.IO.StringReader reader = new System.IO.StringReader("{2}"))
{
string line;
while ((line = reader.ReadLine()) != null)
{
ouf.Add(line.Trim());
}
}
int[] inf = Array.ConvertAll("{I}".Trim().Split(new[] { "\\r\\n", "\r", "\n", " " }, StringSplitOptions.RemoveEmptyEntries), int.Parse);
TPoint center,p;
center.x= inf[0];
center.y = inf[1];
int r = inf[2];
p.x = inf[3];
p.y = inf[4];
int K1 = int.Parse(output[0]);
int K2 = int.Parse(ouf[0]);
if (K1 != K2) return "Wa";
if (K1 == 0) return "Accepted";
TPoint A1, B1, A2,B2;
double[] ans1 = Array.ConvertAll(output[1].Trim().Split(new[] { "\\r\\n", "\r", "\n", " " }, StringSplitOptions.RemoveEmptyEntries), double.Parse);
double[] ouf1 = Array.ConvertAll(ouf[1].Trim().Split(new[] { "\\r\\n", "\r", "\n", " " }, StringSplitOptions.RemoveEmptyEntries), double.Parse);
A1.x = ans1[0];
A1.y = ans1[0];
B1.x = ouf1[0];
B1.y = ouf1[0];
if (K1 == 1)
if (PointEquil(A1, B1))
return "Accepted";
else
return "Wa";
else {
double[] ans2 = Array.ConvertAll(output[2].Trim().Split(new[] { "\\r\\n", "\r", "\n", " " }, StringSplitOptions.RemoveEmptyEntries), double.Parse);
double[] ouf2 = Array.ConvertAll(ouf[2].Trim().Split(new[] { "\\r\\n", "\r", "\n", " " }, StringSplitOptions.RemoveEmptyEntries), double.Parse);
A2.x = ans2[0];
A2.y = ans2[0];
B2.x = ouf2[0];
B2.y = ouf2[0];
if ((PointEquil(A1, B1) && PointEquil(A2, B2)) || (PointEquil(A2, B1) && PointEquil(A1, B2)))
return "Accepted";
else return "Wa";
}
}
catch(Exception e){
return "Presentation Error"+e;
}
}
}