#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
int n, m, x, y;
void solve() {
  if (y - x >= 1) {
    int i = 1, j = m;
    while (j >= 1) {
      printf("%d %d\n", x, i);
      printf("%d %d\n", y, j);
      i++;
      j--;
    }
  } else {
    int i = 1, j = m;
    while (j >= i) {
      printf("%d %d\n", x, i);
      if (j != i) printf("%d %d\n", x, j);
      i++;
      j--;
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  x = 1;
  y = n;
  while (y >= x) {
    solve();
    x++;
    y--;
  }
}
