-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcetvrta.java
26 lines (23 loc) · 970 Bytes
/
cetvrta.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.io.*;
import java.util.*;
public class cetvrta {
public static void main(String[] args) throws Exception {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
ArrayList<Integer> xList = new ArrayList<Integer>();
ArrayList<Integer> yList = new ArrayList<Integer>();
for(int i = 0; i < 3; i++) {
StringTokenizer st = new StringTokenizer(in.readLine());
xList.add(Integer.parseInt(st.nextToken()));
yList.add(Integer.parseInt(st.nextToken()));
}
int x = 0;
int y = 0;
for(int i = 0; i < 3; i++) {
if(Collections.frequency(xList, xList.get(i)) == 1) x = xList.get(i);
if(Collections.frequency(yList, yList.get(i)) == 1) y = yList.get(i);
}
out.println(x + " " + y);
out.close();
}
}