import java.util.*; public class Main { static ArrayList list = new ArrayList<>(); public static void main(String[] args) throws Exception { Scanner scan = new Scanner(System.in); System.out.println(0 + " " + 0); long d1 = scan.nextInt(); possiblePoints(d1); System.out.println(d1 + " " + 0); long d2 = scan.nextInt(); serchPoint(d1, d2); } static void possiblePoints(long d) { for(long x=0; x<=d; x++) { long y = d-x; list.add(new Point(x,y)); } } static void serchPoint(long d1, long d2) { Point p1 = new Point(d1, 0); for(Point p2: list) { long d = Math.abs(p1.x - p2.x) + Math.abs(p1.y - p2.y); if(d == d2) { System.out.println(p2.x + " " + p2.y); return; } } } } class Point { long x,y; Point(long x, long y) { this.x = x; this.y = y; } }