#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int r, c;
  scanf("%d %d", &r, &c);
  for (int i = 1; i <= r / 2; ++i) {
    for (int j = 1; j <= c; ++j) {
      printf("%d %d\n", i, j);
      printf("%d %d\n", r + 1 - i, c + 1 - j);
    }
  }
  if (r % 2 != 0) {
    for (int i = 1; i <= (c + 1) / 2; ++i) {
      printf("%d %d\n", r / 2 + 1, i);
      if (i != c + 1 - i) printf("%d %d\n", r / 2 + 1, c + 1 - i);
    }
  }
  return 0;
}
