#include <bits/stdc++.h>
using namespace std;
void read(int &x) {
  char ch;
  bool ok;
  for (ok = 0, ch = getchar(); !isdigit(ch); ch = getchar())
    if (ch == '-') ok = 1;
  for (x = 0; isdigit(ch); x = x * 10 + ch - '0', ch = getchar())
    ;
  if (ok) x = -x;
}
const int maxn = 1e6 + 10, inf = 1e6;
int n, m, x, y;
int main() {
  read(n), read(m);
  x = 1, y = 1;
  int l = 1, r = m;
  while (l <= r) {
    if (l == r) {
      for (register int i = 1; i <= n / 2; i++) {
        printf("%d %d\n", i, l);
        printf("%d %d\n", n - i + 1, r);
      }
      if (n & 1) printf("%d %d\n", n / 2 + 1, l);
    } else {
      for (register int i = 1; i <= n; i++) {
        printf("%d %d\n", i, l);
        printf("%d %d\n", n - i + 1, r);
      }
    }
    l++, r--;
  }
}
