#include <bits/stdc++.h>
#pragma warning(disable : 6031)
using namespace std;
const int maxn = 1e5 + 10;
const long long mode = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const double pi = 3.14159265358979323846264338327950;
template <class T>
inline T min(T a, T b, T c) {
  return min(min(a, b), c);
}
template <class T>
inline T max(T a, T b, T c) {
  return max(max(a, b), c);
}
template <class T>
inline T min(T a, T b, T c, T d) {
  return min(min(a, b), min(c, d));
}
template <class T>
inline T max(T a, T b, T c, T d) {
  return max(max(a, b), max(c, d));
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n / 2; i++)
    for (int j = 1; j <= m; j++) {
      printf("%d %d\n", i, j);
      printf("%d %d\n", n - i + 1, m - j + 1);
    }
  if (n & 1) {
    int x = n / 2 + 1;
    for (int i = 1, l = 1, r = m; i <= m; i++)
      printf("%d %d\n", x, i & 1 ? l++ : r--);
  }
  return 0;
}
