Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- import java.io.PrintWriter;
- import java.util.StringTokenizer;
- public class Parallelogram {
- private void solve() throws IOException {
- int xa = readInt(), ya = readInt();
- int xb = readInt(), yb = readInt();
- int xc = readInt(), yc = readInt();
- out.println(3);
- out.println((xa + xb - xc) + " " + (ya + yb - yc));
- out.println((xa + xc - xb) + " " + (ya + yc - yb));
- out.println((xb + xc - xa) + " " + (yb + yc - ya));
- }
- //------------------------------------------------------------------------------
- public static void main(String[] args) {
- new Parallelogram().run();
- }
- private void run() {
- try {
- initIO();
- solve();
- in.close();
- out.close();
- } catch (Throwable e) {
- throw new RuntimeException(e);
- }
- }
- private BufferedReader in;
- private StringTokenizer tok;
- private PrintWriter out;
- private void initIO() throws IOException {
- in = new BufferedReader(new InputStreamReader(System.in));
- out = new PrintWriter(System.out);
- // in = new BufferedReader(new FileReader(new File("input.txt")));
- // out = new PrintWriter(new File("output.txt"));
- }
- private String readString() throws IOException {
- while (tok == null || !tok.hasMoreTokens()) {
- tok = new StringTokenizer(in.readLine());
- }
- return tok.nextToken();
- }
- @SuppressWarnings("unused")
- private int readInt() throws IOException {
- return Integer.parseInt(readString());
- }
- @SuppressWarnings("unused")
- private long readLong() throws IOException {
- return Integer.parseInt(readString());
- }
- @SuppressWarnings("unused")
- private double readDouble() throws IOException {
- return Double.parseDouble(readString());
- }
- }
Add Comment
Please, Sign In to add comment