class TwoThreadTest {
	public static void main(String args[]) {
		SimpleThread j = new SimpleThread("Jamaica");
		j.setPriority(5);
		j.start();
		SimpleThread f = new SimpleThread("Fiji");
		f.setPriority(5);
		f.start();
		SimpleThread b = new SimpleThread("Bora Bora");
		b.setPriority(5);
		b.start();
	}
}

class SimpleThread extends Thread {
	public SimpleThread(String str) {
		super(str);
	}
	public void run() {
		for (int i = 0; i < 400000; i++) {
			if ((i % 50000) == 0) { 
				System.out.println(i + " " + getName()); 
				yield();
			}
		}
	}
}
