#include <bits/stdc++.h>
using namespace std;
int n, m;
void imprime(int i1, int i2) {
  int parity = 1;
  if (i1 == i2) {
    int j1 = 1, j2 = m;
    for (int t = 0; t < m; t++) {
      if (parity) {
        printf("%d %d\n", i1, j1);
        j1++;
      } else {
        printf("%d %d\n", i2, j2);
        j2--;
      }
      parity = (parity + 1) % 2;
    }
    return;
  }
  int j1 = 1, j2 = m;
  for (int t = 0; t < 2 * m; t++) {
    if (parity) {
      printf("%d %d\n", i1, j1);
      j1++;
    } else {
      printf("%d %d\n", i2, j2);
      j2--;
    }
    parity = (parity + 1) % 2;
  }
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i1 = 1, i2 = n;;) {
    if (i1 > i2) break;
    imprime(i1, i2);
    i1++;
    i2--;
  }
}
