import java.io.PrintWriter; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int q = sc.nextInt(); int k = sc.nextInt(); sc.close(); int q2 = q + 2; int min = q2 / 4 * 2 + Math.min(q2 % 4, 2); if (min <= k) { PrintWriter pw = new PrintWriter(System.out); pw.println("Yes"); for (int i = 0; i < q; i++) { if (i % 4 < 2) { pw.println("1 2"); } else { pw.println("3 4"); } } pw.flush(); } else { System.out.println("No"); } } }